From: Andreas Dilger Date: Fri, 9 Nov 2001 00:52:26 +0000 (-0700) Subject: Change the i_size calculation to match current kernel policy of only X-Git-Tag: WIP-20011130~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a6bb6274fc0a0fff9072dd63b39e716cb94d4ed;p=thirdparty%2Fe2fsprogs.git Change the i_size calculation to match current kernel policy of only allowing large files for regular files, as opposed to non-directories. --- diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 26b4e6283..6b14edd3b 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -428,14 +428,13 @@ void internal_dump_inode(FILE *out, const char *prefix, inode->i_mode & 0777, inode->i_flags, inode->i_generation); fprintf(out, "%sUser: %5d Group: %5d Size: ", prefix, inode->i_uid, inode->i_gid); - if (LINUX_S_ISDIR(inode->i_mode)) - fprintf(out, "%d\n", inode->i_size); - else { + if (LINUX_S_ISREG(inode->i_mode)) { __u64 i_size = (inode->i_size | ((unsigned long long)inode->i_size_high << 32)); - + fprintf(out, "%lld\n", i_size); - } + } else + fprintf(out, "%d\n", inode->i_size); if (current_fs->super->s_creator_os == EXT2_OS_HURD) fprintf(out, "%sFile ACL: %d Directory ACL: %d Translator: %d\n",