Пример #1
0
void scp_printinfo(struct scp_handle *scp)
{
    uint8_t info[2];
    scp_send(scp, SCPCMD_SCPINFO, NULL, 0);
    read_exact(scp->fd, info, 2);
    printf("Supercard Pro: Hardware v%u.%u; Firmware v%u.%u\n",
           info[0] >> 4, info[0] & 15, info[1] >> 4, info[1] & 15);
}
Пример #2
0
/*
 * libssh2_scp_send64
 *
 * Send a file using SCP
 */
LIBSSH2_API LIBSSH2_CHANNEL *
libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode,
                   libssh2_int64_t size, time_t mtime, time_t atime)
{
    LIBSSH2_CHANNEL *ptr;
    BLOCK_ADJUST_ERRNO(ptr, session,
                       scp_send(session, path, mode, size, mtime, atime));
    return ptr;
}
Пример #3
0
/*
 * libssh2_scp_send_ex
 *
 * Send a file using SCP. Old API.
 */
LIBSSH2_API LIBSSH2_CHANNEL *
libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode,
                    size_t size, long mtime, long atime)
{
    LIBSSH2_CHANNEL *ptr;
    BLOCK_ADJUST_ERRNO(ptr, session,
                       scp_send(session, path, mode, size,
                                (time_t)mtime, (time_t)atime));
    return ptr;
}
Пример #4
0
void scp_deselectdrive(struct scp_handle *scp, unsigned int drv)
{
    scp_send(scp, SCPCMD_MTRAOFF + drv, NULL, 0);
    scp_send(scp, SCPCMD_DSELA + drv, NULL, 0);
}
Пример #5
0
void scp_ramtest(struct scp_handle *scp)
{
    scp_send(scp, SCPCMD_RAMTEST, NULL, 0);
}