1.1 --- a/libe2access/lib/src/image.c Thu Feb 24 22:34:43 2022 +0100
1.2 +++ b/libe2access/lib/src/image.c Thu Feb 24 22:35:00 2022 +0100
1.3 @@ -644,6 +644,8 @@
1.4 if (retval)
1.5 return retval;
1.6
1.7 + /* NOTE: Could access large inode members and other information. */
1.8 +
1.9 st->st_dev = 0; /* device identifier */
1.10 st->st_ino = ino;
1.11 st->st_mode = inode.i_mode;
1.12 @@ -653,7 +655,7 @@
1.13 st->st_rdev = 0; /* special file device identifier */
1.14 st->st_size = EXT2_I_SIZE(&inode);
1.15 st->st_blksize = fs->blocksize;
1.16 - st->st_blocks = 0; /* number of 512 byte blocks allocated */
1.17 + st->st_blocks = inode.i_blocks; /* number of 512 byte blocks allocated */
1.18 st->st_atim.tv_sec = inode.i_atime;
1.19 st->st_atim.tv_nsec = 0; /* nanosecond resolution */
1.20 st->st_mtim.tv_sec = inode.i_mtime;