aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-19 03:20:03 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-19 03:20:03 +0000
commitf81bb8593ab45e072547369c13935460e1ebe753 (patch)
treef98b6d5bf4c3d48dd54db386c29d39ab26e1463e /e2fsprogs
parentca40cc4d80863b7520492467135ff185b8322459 (diff)
downloadbusybox-w32-f81bb8593ab45e072547369c13935460e1ebe753.tar.gz
busybox-w32-f81bb8593ab45e072547369c13935460e1ebe753.tar.bz2
busybox-w32-f81bb8593ab45e072547369c13935460e1ebe753.zip
Make some 64 bit warnings go away on x86-64.
git-svn-id: svn://busybox.net/trunk/busybox@15429 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/e2fsck.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/e2fsprogs/e2fsck.c b/e2fsprogs/e2fsck.c
index ceafaea4b..0d151ef80 100644
--- a/e2fsprogs/e2fsck.c
+++ b/e2fsprogs/e2fsck.c
@@ -3,9 +3,6 @@
3 * 3 *
4 * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o. 4 * Copyright (C) 1993, 1994, 1995, 1996, 1997 Theodore Ts'o.
5 * Copyright (C) 2006 Garrett Kajmowicz 5 * Copyright (C) 2006 Garrett Kajmowicz
6 * This file may be
7 * redistributed under the terms of the GNU Public License.
8 *
9 * 6 *
10 * Dictionary Abstract Data Type 7 * Dictionary Abstract Data Type
11 * Copyright (C) 1997 Kaz Kylheku <kaz@ashi.footprints.net> 8 * Copyright (C) 1997 Kaz Kylheku <kaz@ashi.footprints.net>
@@ -25,12 +22,10 @@
25 * 22 *
26 * Copyright 1999-2000 Red Hat Software --- All Rights Reserved 23 * Copyright 1999-2000 Red Hat Software --- All Rights Reserved
27 * 24 *
28 * This file is part of the Linux kernel and is made available under
29 * the terms of the GNU General Public License, version 2, or at your
30 * option, any later version, incorporated herein by reference.
31 *
32 * Journal recovery routines for the generic filesystem journaling code; 25 * Journal recovery routines for the generic filesystem journaling code;
33 * part of the ext2fs journaling system. 26 * part of the ext2fs journaling system.
27 *
28 * Licensed under GPLv2 or later, see file License in this tarball for details.
34 */ 29 */
35 30
36#ifndef _GNU_SOURCE 31#ifndef _GNU_SOURCE
@@ -2532,16 +2527,8 @@ static void expand_inode_expression(char ch,
2532 if (LINUX_S_ISDIR(inode->i_mode)) 2527 if (LINUX_S_ISDIR(inode->i_mode))
2533 printf("%u", inode->i_size); 2528 printf("%u", inode->i_size);
2534 else { 2529 else {
2535#ifdef EXT2_NO_64_TYPE 2530 printf("%"PRIu64, (inode->i_size |
2536 if (inode->i_size_high) 2531 ((uint64_t) inode->i_size_high << 32)));
2537 printf("0x%x%08x", inode->i_size_high,
2538 inode->i_size);
2539 else
2540 printf("%u", inode->i_size);
2541#else
2542 printf("%llu", (inode->i_size |
2543 ((__u64) inode->i_size_high << 32)));
2544#endif
2545 } 2532 }
2546 break; 2533 break;
2547 case 'S': 2534 case 'S':
@@ -2649,11 +2636,7 @@ static void expand_percent_expression(ext2_filsys fs, char ch,
2649 printf("%u", ctx->blk); 2636 printf("%u", ctx->blk);
2650 break; 2637 break;
2651 case 'B': 2638 case 'B':
2652#ifdef EXT2_NO_64_TYPE 2639 printf("%"PRIi64, ctx->blkcount);
2653 printf("%d", ctx->blkcount);
2654#else
2655 printf("%lld", ctx->blkcount);
2656#endif
2657 break; 2640 break;
2658 case 'c': 2641 case 'c':
2659 printf("%u", ctx->blk2); 2642 printf("%u", ctx->blk2);
@@ -2674,11 +2657,7 @@ static void expand_percent_expression(ext2_filsys fs, char ch,
2674 printf("%s", error_message(ctx->errcode)); 2657 printf("%s", error_message(ctx->errcode));
2675 break; 2658 break;
2676 case 'N': 2659 case 'N':
2677#ifdef EXT2_NO_64_TYPE 2660 printf("%"PRIi64, ctx->num);
2678 printf("%u", ctx->num);
2679#else
2680 printf("%llu", ctx->num);
2681#endif
2682 break; 2661 break;
2683 case 'p': 2662 case 'p':
2684 print_pathname(fs, ctx->ino, 0); 2663 print_pathname(fs, ctx->ino, 0);
@@ -2700,11 +2679,7 @@ static void expand_percent_expression(ext2_filsys fs, char ch,
2700 printf("%s", ctx->str ? ctx->str : "NULL"); 2679 printf("%s", ctx->str ? ctx->str : "NULL");
2701 break; 2680 break;
2702 case 'X': 2681 case 'X':
2703#ifdef EXT2_NO_64_TYPE 2682 printf("0x%"PRIi64, ctx->num);
2704 printf("0x%x", ctx->num);
2705#else
2706 printf("0x%llx", ctx->num);
2707#endif
2708 break; 2683 break;
2709 default: 2684 default:
2710 no_context: 2685 no_context:
@@ -4436,7 +4411,7 @@ static int process_bad_block(ext2_filsys fs FSCK_ATTR((unused)),
4436 * inode, which is never compressed. So we don't use HOLE_BLKADDR(). 4411 * inode, which is never compressed. So we don't use HOLE_BLKADDR().
4437 */ 4412 */
4438 4413
4439 printf("Unrecoverable Error: Found %lli bad blocks starting at block number: %u\n", blockcnt, *block_nr); 4414 printf("Unrecoverable Error: Found %"PRIi64" bad blocks starting at block number: %u\n", blockcnt, *block_nr);
4440 return BLOCK_ERROR; 4415 return BLOCK_ERROR;
4441} 4416}
4442 4417