diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-23 15:20:37 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-23 15:20:37 +0000 |
commit | 42676ca0f638a76369730269b5d8aa590694bcc0 (patch) | |
tree | c191c5f01890683f62e75c11a221e4215b3c49ca /sshfs.c | |
parent | 5098495dbb794cbd446e11487e5e940b12afabfa (diff) | |
download | sshfs-42676ca0f638a76369730269b5d8aa590694bcc0.tar sshfs-42676ca0f638a76369730269b5d8aa590694bcc0.tar.gz sshfs-42676ca0f638a76369730269b5d8aa590694bcc0.tar.bz2 sshfs-42676ca0f638a76369730269b5d8aa590694bcc0.zip |
fix
Diffstat (limited to 'sshfs.c')
-rw-r--r-- | sshfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -95,6 +95,7 @@ static int sync_write = 0; static int sync_read = 0; static char *base_path; static char *host; +static unsigned blksize = 4096; struct buffer { uint8_t *p; @@ -497,6 +498,10 @@ static int buf_get_attrs(struct buffer *buf, struct stat *stbuf) stbuf->st_mode = mode; stbuf->st_nlink = 1; stbuf->st_size = size; + if (blksize) { + stbuf->st_blksize = blksize; + stbuf->st_blocks = ((size + blksize - 1) & ~(blksize - 1)) >> 9; + } stbuf->st_uid = uid; stbuf->st_gid = gid; stbuf->st_atime = atime; |