version 1.83, 2008/06/07 21:52:46 |
version 1.84, 2008/06/08 20:15:29 |
|
|
} |
} |
|
|
static int |
static int |
get_decode_statvfs(int fd, struct statvfs *st, u_int expected_id, int quiet) |
get_decode_statvfs(int fd, struct sftp_statvfs *st, u_int expected_id, |
|
int quiet) |
{ |
{ |
Buffer msg; |
Buffer msg; |
u_int type, id, flag; |
u_int type, id, flag; |
|
|
} |
} |
|
|
bzero(st, sizeof(*st)); |
bzero(st, sizeof(*st)); |
st->f_bsize = buffer_get_int(&msg); |
st->f_bsize = buffer_get_int64(&msg); |
st->f_frsize = buffer_get_int(&msg); |
st->f_frsize = buffer_get_int64(&msg); |
st->f_blocks = buffer_get_int64(&msg); |
st->f_blocks = buffer_get_int64(&msg); |
st->f_bfree = buffer_get_int64(&msg); |
st->f_bfree = buffer_get_int64(&msg); |
st->f_bavail = buffer_get_int64(&msg); |
st->f_bavail = buffer_get_int64(&msg); |
|
|
st->f_ffree = buffer_get_int64(&msg); |
st->f_ffree = buffer_get_int64(&msg); |
st->f_favail = buffer_get_int64(&msg); |
st->f_favail = buffer_get_int64(&msg); |
st->f_fsid = buffer_get_int64(&msg); |
st->f_fsid = buffer_get_int64(&msg); |
flag = buffer_get_int(&msg); |
flag = buffer_get_int64(&msg); |
st->f_namemax = buffer_get_int(&msg); |
st->f_namemax = buffer_get_int64(&msg); |
|
|
st->f_flag = (flag & SSH2_FXE_STATVFS_ST_RDONLY) ? ST_RDONLY : 0; |
st->f_flag = (flag & SSH2_FXE_STATVFS_ST_RDONLY) ? ST_RDONLY : 0; |
st->f_flag |= (flag & SSH2_FXE_STATVFS_ST_NOSUID) ? ST_NOSUID : 0; |
st->f_flag |= (flag & SSH2_FXE_STATVFS_ST_NOSUID) ? ST_NOSUID : 0; |
|
|
#endif |
#endif |
|
|
int |
int |
do_statvfs(struct sftp_conn *conn, const char *path, struct statvfs *st, |
do_statvfs(struct sftp_conn *conn, const char *path, struct sftp_statvfs *st, |
int quiet) |
int quiet) |
{ |
{ |
Buffer msg; |
Buffer msg; |
|
|
#ifdef notyet |
#ifdef notyet |
int |
int |
do_fstatvfs(struct sftp_conn *conn, const char *handle, u_int handle_len, |
do_fstatvfs(struct sftp_conn *conn, const char *handle, u_int handle_len, |
struct statvfs *st, int quiet) |
struct sftp_statvfs *st, int quiet) |
{ |
{ |
Buffer msg; |
Buffer msg; |
u_int id; |
u_int id; |