linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tahsin Erdogan <tahsin@google.com>
To: Andreas Dilger <adilger@dilger.ca>,
	"Darrick J . Wong" <darrick.wong@oracle.com>,
	Theodore Ts'o <tytso@mit.edu>,
	linux-ext4@vger.kernel.org
Cc: Tahsin Erdogan <tahsin@google.com>
Subject: [PATCH] e2fsck: remove #ifdef EXT2_NO_64_TYPE blocks
Date: Tue, 27 Jun 2017 18:22:40 -0700	[thread overview]
Message-ID: <20170628012240.9141-1-tahsin@google.com> (raw)

EXT2_NO_64_TYPE is not defined anywhere. It appears to be a
historical artifact.

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
---
 e2fsck/message.c | 42 ++----------------------------------------
 1 file changed, 2 insertions(+), 40 deletions(-)

diff --git a/e2fsck/message.c b/e2fsck/message.c
index 525f4a1e7628..46522d10fbb1 100644
--- a/e2fsck/message.c
+++ b/e2fsck/message.c
@@ -280,17 +280,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);
@@ -411,11 +402,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)
@@ -431,20 +418,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);
@@ -462,18 +440,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':
-#ifdef EXT2_NO_64_TYPE
-		fprintf(f, "%*u", width, ctx->num2);
-#else
 		fprintf(f, "%*llu", width, (long long)ctx->num2);
-#endif
 		break;
 	case 'p':
 		print_pathname(f, fs, ctx->ino, 0);
@@ -489,11 +459,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));
@@ -511,11 +477,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);
-- 
2.13.2.725.g09c95d1e9-goog

             reply	other threads:[~2017-06-28  1:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  1:22 Tahsin Erdogan [this message]
2017-06-28 16:38 ` [PATCH] e2fsck: remove #ifdef EXT2_NO_64_TYPE blocks Andreas Dilger
2017-07-05  4:09   ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628012240.9141-1-tahsin@google.com \
    --to=tahsin@google.com \
    --cc=adilger@dilger.ca \
    --cc=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).