]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - e2fsck/message.c
Merge branch 'maint' into next
[thirdparty/e2fsprogs.git] / e2fsck / message.c
index 30ce620aa123aecffcc0d73f7febfeaeeb31a5e6..727f71d5f7ad27365d5a725f7000e849f385ef58 100644 (file)
@@ -32,7 +32,7 @@
  *     %IM     <inode> -> i_mtime
  *     %IF     <inode> -> i_faddr
  *     %If     <inode> -> i_file_acl
- *     %Id     <inode> -> i_dir_acl
+ *     %Id     <inode> -> i_size_high
  *     %Iu     <inode> -> i_uid
  *     %Ig     <inode> -> i_gid
  *     %It     <inode type>
@@ -283,17 +283,8 @@ static _INLINE_ void expand_inode_expression(FILE *f, ext2_filsys fs, char ch,
        case 's':
                if (LINUX_S_ISDIR(inode->i_mode))
                        fprintf(f, "%u", inode->i_size);
-               else {
-#ifdef EXT2_NO_64_TYPE
-                       if (inode->i_size_high)
-                               fprintf(f, "0x%x%08x", inode->i_size_high,
-                                       inode->i_size);
-                       else
-                               fprintf(f, "%u", inode->i_size);
-#else
+               else
                        fprintf(f, "%llu", EXT2_I_SIZE(inode));
-#endif
-               }
                break;
        case 'S':
                fprintf(f, "%u", large_inode->i_extra_isize);
@@ -323,7 +314,7 @@ static _INLINE_ void expand_inode_expression(FILE *f, ext2_filsys fs, char ch,
                break;
        case 'd':
                fprintf(f, "%u", (LINUX_S_ISDIR(inode->i_mode) ?
-                                 inode->i_dir_acl : 0));
+                       inode->i_size_high : 0));
                break;
        case 'u':
                fprintf(f, "%d", inode_uid(*inode));
@@ -414,11 +405,7 @@ static _INLINE_ void expand_percent_expression(FILE *f, ext2_filsys fs,
                fputc('%', f);
                break;
        case 'b':
-#ifdef EXT2_NO_64_TYPE
-               fprintf(f, "%*u", width, (unsigned long) ctx->blk);
-#else
                fprintf(f, "%*llu", width, (unsigned long long) ctx->blk);
-#endif
                break;
        case 'B':
                if (ctx->blkcount == BLOCK_COUNT_IND)
@@ -434,20 +421,11 @@ static _INLINE_ void expand_percent_expression(FILE *f, ext2_filsys fs,
                if (*first && islower(m[0]))
                        fputc(toupper(*m++), f);
                fputs(m, f);
-               if (ctx->blkcount >= 0) {
-#ifdef EXT2_NO_64_TYPE
-                       fprintf(f, "%d", ctx->blkcount);
-#else
+               if (ctx->blkcount >= 0)
                        fprintf(f, "%lld", (long long) ctx->blkcount);
-#endif
-               }
                break;
        case 'c':
-#ifdef EXT2_NO_64_TYPE
-               fprintf(f, "%*u", width, (unsigned long) ctx->blk2);
-#else
                fprintf(f, "%*llu", width, (unsigned long long) ctx->blk2);
-#endif
                break;
        case 'd':
                fprintf(f, "%*u", width, ctx->dir);
@@ -465,11 +443,10 @@ static _INLINE_ void expand_percent_expression(FILE *f, ext2_filsys fs,
                fprintf(f, "%*s", width, error_message(ctx->errcode));
                break;
        case 'N':
-#ifdef EXT2_NO_64_TYPE
-               fprintf(f, "%*u", width, ctx->num);
-#else
                fprintf(f, "%*llu", width, (long long)ctx->num);
-#endif
+               break;
+       case 'n':
+               fprintf(f, "%*llu", width, (long long)ctx->num2);
                break;
        case 'p':
                print_pathname(f, fs, ctx->ino, 0);
@@ -485,11 +462,7 @@ static _INLINE_ void expand_percent_expression(FILE *f, ext2_filsys fs,
                print_pathname(f, fs, ctx->dir, ctx->ino);
                break;
        case 'r':
-#ifdef EXT2_NO_64_TYPE
-               fprintf(f, "%*d", width, ctx->blkcount);
-#else
                fprintf(f, "%*lld", width, (long long) ctx->blkcount);
-#endif
                break;
        case 'S':
                fprintf(f, "%llu", get_backup_sb(NULL, fs, NULL, NULL));
@@ -528,11 +501,7 @@ static _INLINE_ void expand_percent_expression(FILE *f, ext2_filsys fs,
                fprintf(f, "0x%0*x", width, ctx->csum1);
                break;
        case 'X':
-#ifdef EXT2_NO_64_TYPE
-               fprintf(f, "0x%0*x", width, ctx->num);
-#else
                fprintf(f, "0x%0*llx", width, (long long)ctx->num);
-#endif
                break;
        case 'y':
                fprintf(f, "0x%0*x", width, ctx->csum2);