Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/config.h b/src/config.h
- index 3d6e7c5..345512e 100644
- --- a/src/config.h
- +++ b/src/config.h
- @@ -56,6 +56,7 @@ struct rfs_list;
- + sizeof(uint64_t) /* ctime */ \
- + sizeof(uint32_t) /* blocks */ \
- + + sizeof(uint64_t) /* ino */ \
- #ifdef RFS_DEBUG
- #define DEFAULT_PASSWD_FILE "./rfs-passwd"
- diff --git a/src/handlers/utils.c b/src/handlers/utils.c
- index 1870a11..4e59d56 100644
- --- a/src/handlers/utils.c
- +++ b/src/handlers/utils.c
- @@ -46,6 +46,7 @@ char* pack_stat(struct stat *stbuf, char *buffer)
- uint64_t ctime = stbuf->st_ctime;
- uint32_t nlink = stbuf->st_nlink;
- uint32_t blocks = stbuf->st_blocks;
- + uint64_t ino = stbuf->st_ino;
- pack_32(&blocks,
- pack_32(&nlink,
- @@ -53,8 +54,9 @@ char* pack_stat(struct stat *stbuf, char *buffer)
- pack_64(&mtime,
- pack_64(&atime,
- pack_64(&size,
- - pack_32(&mode, buffer
- - )))))));
- + pack_32(&mode,
- + pack_64(&ino, buffer
- + ))))))));
- #ifdef RFS_DEBUG
- dump(buffer, STAT_BLOCK_SIZE);
- diff --git a/src/operations/utils.c b/src/operations/utils.c
- index be9ff1a..5c78db5 100644
- --- a/src/operations/utils.c
- +++ b/src/operations/utils.c
- @@ -59,6 +59,7 @@ const char* unpack_stat(struct stat *result, const char *buffer)
- uint64_t ctime = 0;
- uint32_t nlink = 0;
- uint32_t blocks = 0;
- + uint64_t ino = 0;
- #ifdef RFS_DEBUG
- dump(buffer, STAT_BLOCK_SIZE);
- @@ -70,8 +71,9 @@ const char* unpack_stat(struct stat *result, const char *buffer)
- unpack_64(&mtime,
- unpack_64(&atime,
- unpack_64(&size,
- - unpack_32(&mode, buffer
- - )))))));
- + unpack_32(&mode,
- + unpack_64(&ino, buffer
- + ))))))));
- result->st_mode = mode;
- result->st_size = size;
- @@ -80,6 +82,7 @@ const char* unpack_stat(struct stat *result, const char *buffer)
- result->st_ctime = ctime;
- result->st_nlink = nlink;
- result->st_blocks = blocks;
- + result->st_ino = ino;
- return buffer + STAT_BLOCK_SIZE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement