e2fsprogs/e2fsprogs-1.39-fix_formats.patch

553 lines
22 KiB
Diff
Raw Normal View History

# HG changeset patch
# User tytso@mit.edu
# Date Tue Sep 12 14:56:15 2006 -0400
# Node ID 4b504bc7413f5ef17f8b62f4b3479da6bfa83efb
# parent: 59bf36fb8344bb7a3971af7df22d41f8d8b14610
Fix signed vs unsigned printf format strings for block and inode numbers
There were still some %d's lurking when we print blocks & inodes; also
many of the counters in the e2fsck_struct were signed, and probably
need to be unsigned to avoid overflows.
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
Index: e2fsprogs-1.39-my-patches-from-ted/debugfs/ChangeLog
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/debugfs/ChangeLog
+++ e2fsprogs-1.39-my-patches-from-ted/debugfs/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
+ * htree.c (htree_dump_int_node): Fix printf formats.
+
2006-05-29 Theodore Tso <tytso@mit.edu>
* util.c (reset_getopt): In order to support ancient Linux header
Index: e2fsprogs-1.39-my-patches-from-ted/debugfs/htree.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/debugfs/htree.c
+++ e2fsprogs-1.39-my-patches-from-ted/debugfs/htree.c
@@ -114,7 +114,7 @@ static void htree_dump_int_node(ext2_fil
for (i=0; i < limit.count; i++) {
hash = i ? ext2fs_le32_to_cpu(ent[i].hash) : 0;
- fprintf(pager, "Entry #%d: Hash 0x%08x%s, block %d\n", i,
+ fprintf(pager, "Entry #%d: Hash 0x%08x%s, block %u\n", i,
hash, (hash & 1) ? " (**)" : "",
ext2fs_le32_to_cpu(ent[i].block));
}
Index: e2fsprogs-1.39-my-patches-from-ted/e2fsck/ChangeLog
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/e2fsck/ChangeLog
+++ e2fsprogs-1.39-my-patches-from-ted/e2fsck/ChangeLog
@@ -1,5 +1,12 @@
2006-08-30 Eric Sandeen <esandeen@redhat.com>
+ * e2fsck.h (e2fsck): Use unsigned types for filesystem counters.
+ * emptydir.c (add_empty_dirblock):
+ * iscan.c (main):
+ * unix.c (show_stats, check_if_skip): Fix printf formats.
+
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
* pass1.c (handle_fs_bad_blocks): Remove unused variables.
2006-08-30 Eric Sandeen <esandeen@redhat.com>
Index: e2fsprogs-1.39-my-patches-from-ted/e2fsck/e2fsck.h
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/e2fsck/e2fsck.h
+++ e2fsprogs-1.39-my-patches-from-ted/e2fsck/e2fsck.h
@@ -306,24 +306,24 @@ struct e2fsck_struct {
char start_meta[2], stop_meta[2];
/* File counts */
- int fs_directory_count;
- int fs_regular_count;
- int fs_blockdev_count;
- int fs_chardev_count;
- int fs_links_count;
- int fs_symlinks_count;
- int fs_fast_symlinks_count;
- int fs_fifo_count;
- int fs_total_count;
- int fs_badblocks_count;
- int fs_sockets_count;
- int fs_ind_count;
- int fs_dind_count;
- int fs_tind_count;
- int fs_fragmented;
- int large_files;
- int fs_ext_attr_inodes;
- int fs_ext_attr_blocks;
+ __u32 fs_directory_count;
+ __u32 fs_regular_count;
+ __u32 fs_blockdev_count;
+ __u32 fs_chardev_count;
+ __u32 fs_links_count;
+ __u32 fs_symlinks_count;
+ __u32 fs_fast_symlinks_count;
+ __u32 fs_fifo_count;
+ __u32 fs_total_count;
+ __u32 fs_badblocks_count;
+ __u32 fs_sockets_count;
+ __u32 fs_ind_count;
+ __u32 fs_dind_count;
+ __u32 fs_tind_count;
+ __u32 fs_fragmented;
+ __u32 large_files;
+ __u32 fs_ext_attr_inodes;
+ __u32 fs_ext_attr_blocks;
time_t now;
Index: e2fsprogs-1.39-my-patches-from-ted/e2fsck/emptydir.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/e2fsck/emptydir.c
+++ e2fsprogs-1.39-my-patches-from-ted/e2fsck/emptydir.c
@@ -94,7 +94,7 @@ void add_empty_dirblock(empty_dir_info e
if (db->ino == 11)
return; /* Inode number 11 is usually lost+found */
- printf(_("Empty directory block %u (#%d) in inode %d\n"),
+ printf(_("Empty directory block %u (#%d) in inode %u\n"),
db->blk, db->blockcnt, db->ino);
ext2fs_mark_block_bitmap(edi->empty_dir_blocks, db->blk);
Index: e2fsprogs-1.39-my-patches-from-ted/e2fsck/iscan.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/e2fsck/iscan.c
+++ e2fsprogs-1.39-my-patches-from-ted/e2fsck/iscan.c
@@ -98,7 +98,7 @@ int main (int argc, char *argv[])
int exit_value = FSCK_OK;
ext2_filsys fs;
ext2_ino_t ino;
- int num_inodes = 0;
+ __u32 num_inodes = 0;
struct ext2_inode inode;
ext2_inode_scan scan;
@@ -135,7 +135,7 @@ int main (int argc, char *argv[])
}
print_resource_track(NULL, &global_rtrack);
- printf(_("%d inodes scanned.\n"), num_inodes);
+ printf(_("%u inodes scanned.\n"), num_inodes);
exit(0);
}
Index: e2fsprogs-1.39-my-patches-from-ted/e2fsck/unix.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/e2fsck/unix.c
+++ e2fsprogs-1.39-my-patches-from-ted/e2fsck/unix.c
@@ -98,7 +98,7 @@ static void usage(e2fsck_t ctx)
static void show_stats(e2fsck_t ctx)
{
ext2_filsys fs = ctx->fs;
- int inodes, inodes_used;
+ __u32 inodes, inodes_used;
blk_t blocks, blocks_used;
int dir_links;
int num_files, num_links;
@@ -118,49 +118,48 @@ static void show_stats(e2fsck_t ctx)
frag_percent = (frag_percent + 5) / 10;
if (!verbose) {
- printf(_("%s: %d/%d files (%0d.%d%% non-contiguous), %u/%u blocks\n"),
+ printf(_("%s: %u/%u files (%0d.%d%% non-contiguous), %u/%u blocks\n"),
ctx->device_name, inodes_used, inodes,
frag_percent / 10, frag_percent % 10,
blocks_used, blocks);
return;
}
- printf (P_("\n%8d inode used (%d%%)\n", "\n%8d inodes used (%d%%)\n",
- inodes_used), inodes_used, 100 * inodes_used / inodes);
- printf (P_("%8d non-contiguous inode (%0d.%d%%)\n",
- "%8d non-contiguous inodes (%0d.%d%%)\n",
+ printf (P_("\n%8u inode used (%2.2f%%)\n", "\n%8u inodes used (%2.2f%%)\n",
+ inodes_used), inodes_used, 100.0 * inodes_used / inodes);
+ printf (P_("%8u non-contiguous inode (%0d.%d%%)\n",
+ "%8u non-contiguous inodes (%0d.%d%%)\n",
ctx->fs_fragmented),
ctx->fs_fragmented, frag_percent / 10, frag_percent % 10);
- printf (_(" # of inodes with ind/dind/tind blocks: %d/%d/%d\n"),
+ printf (_(" # of inodes with ind/dind/tind blocks: %u/%u/%u\n"),
ctx->fs_ind_count, ctx->fs_dind_count, ctx->fs_tind_count);
- printf (P_("%8u block used (%d%%)\n", "%8u blocks used (%d%%)\n",
- blocks_used),
- blocks_used, (int) ((long long) 100 * blocks_used / blocks));
- printf (P_("%8d bad block\n", "%8d bad blocks\n",
+ printf (P_("%8u block used (%2.2f%%)\n", "%8u blocks used (%2.2f%%)\n",
+ blocks_used), blocks_used, 100.0 * blocks_used / blocks);
+ printf (P_("%8u bad block\n", "%8u bad blocks\n",
ctx->fs_badblocks_count), ctx->fs_badblocks_count);
- printf (P_("%8d large file\n", "%8d large files\n",
+ printf (P_("%8u large file\n", "%8u large files\n",
ctx->large_files), ctx->large_files);
- printf (P_("\n%8d regular file\n", "\n%8d regular files\n",
+ printf (P_("\n%8u regular file\n", "\n%8u regular files\n",
ctx->fs_regular_count), ctx->fs_regular_count);
- printf (P_("%8d directory\n", "%8d directories\n",
+ printf (P_("%8u directory\n", "%8u directories\n",
ctx->fs_directory_count), ctx->fs_directory_count);
- printf (P_("%8d character device file\n",
- "%8d character device files\n", ctx->fs_chardev_count),
+ printf (P_("%8u character device file\n",
+ "%8u character device files\n", ctx->fs_chardev_count),
ctx->fs_chardev_count);
- printf (P_("%8d block device file\n", "%8d block device files\n",
+ printf (P_("%8u block device file\n", "%8u block device files\n",
ctx->fs_blockdev_count), ctx->fs_blockdev_count);
- printf (P_("%8d fifo\n", "%8d fifos\n", ctx->fs_fifo_count),
+ printf (P_("%8u fifo\n", "%8u fifos\n", ctx->fs_fifo_count),
ctx->fs_fifo_count);
- printf (P_("%8d link\n", "%8d links\n",
+ printf (P_("%8u link\n", "%8u links\n",
ctx->fs_links_count - dir_links),
ctx->fs_links_count - dir_links);
- printf (P_("%8d symbolic link", "%8d symbolic links",
+ printf (P_("%8u symbolic link", "%8u symbolic links",
ctx->fs_symlinks_count), ctx->fs_symlinks_count);
- printf (P_(" (%d fast symbolic link)\n", " (%d fast symbolic links)\n",
+ printf (P_(" (%u fast symbolic link)\n", " (%u fast symbolic links)\n",
ctx->fs_fast_symlinks_count), ctx->fs_fast_symlinks_count);
- printf (P_("%8d socket\n", "%8d sockets\n", ctx->fs_sockets_count),
+ printf (P_("%8u socket\n", "%8u sockets\n", ctx->fs_sockets_count),
ctx->fs_sockets_count);
printf ("--------\n");
- printf (P_("%8d file\n", "%8d files\n",
+ printf (P_("%8u file\n", "%8u files\n",
ctx->fs_total_count - dir_links),
ctx->fs_total_count - dir_links);
}
@@ -300,7 +299,7 @@ static void check_if_skip(e2fsck_t ctx)
fputs(_(", check forced.\n"), stdout);
return;
}
- printf(_("%s: clean, %d/%d files, %u/%u blocks"), ctx->device_name,
+ printf(_("%s: clean, %u/%u files, %u/%u blocks"), ctx->device_name,
fs->super->s_inodes_count - fs->super->s_free_inodes_count,
fs->super->s_inodes_count,
fs->super->s_blocks_count - fs->super->s_free_blocks_count,
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/ChangeLog
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/ChangeLog
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/ChangeLog
@@ -1,5 +1,17 @@
2006-08-30 Eric Sandeen <esandeen@redhat.com>
+ * bmove.c (process_block):
+ * getsize.c (main):
+ * icount.c (ext2fs_create_icount2, insert_icount_el):
+ * tst_badblocks.c (print_list, validate_test_seq, do_test_seq):
+ * tst_badblocks.c (invalid_proc):
+ * tst_getsize.c (main):
+ * tst_iscan.c (check_map):
+ * unix_io.c (raw_read_blk, unix_read_blk):
+ * write_bb_file.c (ext2fs_write_bb_FILE): Fix printf formats.
+
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
* closefs.c (write_backup_super):
* initialize.c (ext2fs_initialize): Remove unused variables.
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/bmove.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/bmove.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/bmove.c
@@ -73,7 +73,7 @@ static int process_block(ext2_filsys fs,
ext2fs_mark_block_bitmap(pb->alloc_map, block);
ret = BLOCK_CHANGED;
if (pb->flags & EXT2_BMOVE_DEBUG)
- printf("ino=%ld, blockcnt=%lld, %d->%d\n", pb->ino,
+ printf("ino=%ld, blockcnt=%lld, %u->%u\n", pb->ino,
blockcnt, orig, block);
}
if (pb->add_dir) {
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/getsize.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/getsize.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/getsize.c
@@ -302,7 +302,7 @@ int main(int argc, char **argv)
"while calling ext2fs_get_device_size");
exit(1);
}
- printf("Device %s has %d 1k blocks.\n", argv[1], blocks);
+ printf("Device %s has %u 1k blocks.\n", argv[1], blocks);
exit(0);
}
#endif
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/icount.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/icount.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/icount.c
@@ -116,7 +116,7 @@ errcode_t ext2fs_create_icount2(ext2_fil
bytes = (size_t) (icount->size * sizeof(struct ext2_icount_el));
#if 0
- printf("Icount allocated %d entries, %d bytes.\n",
+ printf("Icount allocated %u entries, %d bytes.\n",
icount->size, bytes);
#endif
retval = ext2fs_get_mem(bytes, &icount->list);
@@ -176,7 +176,7 @@ static struct ext2_icount_el *insert_ico
if (new_size < (icount->size + 100))
new_size = icount->size + 100;
#if 0
- printf("Reallocating icount %d entries...\n", new_size);
+ printf("Reallocating icount %u entries...\n", new_size);
#endif
retval = ext2fs_resize_mem((size_t) icount->size *
sizeof(struct ext2_icount_el),
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/tst_badblocks.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/tst_badblocks.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/tst_badblocks.c
@@ -103,7 +103,7 @@ static void print_list(badblocks_list bb
}
ok = i = 1;
while (ext2fs_badblocks_list_iterate(iter, &blk)) {
- printf("%d ", blk);
+ printf("%u ", blk);
if (i++ != blk)
ok = 0;
}
@@ -130,7 +130,7 @@ static void validate_test_seq(badblocks_
ok = 0;
test_fail++;
}
- printf("\tblock %d is %s --- %s\n", vec[i],
+ printf("\tblock %u is %s --- %s\n", vec[i],
match ? "present" : "absent",
ok ? "OK" : "NOT OK");
}
@@ -145,7 +145,7 @@ static void do_test_seq(badblocks_list b
case ADD_BLK:
ext2fs_badblocks_list_add(bb, vec[i]);
match = ext2fs_badblocks_list_test(bb, vec[i]);
- printf("Adding block %d --- now %s\n", vec[i],
+ printf("Adding block %u --- now %s\n", vec[i],
match ? "present" : "absent");
if (!match) {
printf("FAILURE!\n");
@@ -155,7 +155,7 @@ static void do_test_seq(badblocks_list b
case DEL_BLK:
ext2fs_badblocks_list_del(bb, vec[i]);
match = ext2fs_badblocks_list_test(bb, vec[i]);
- printf("Removing block %d --- now %s\n", vec[i],
+ printf("Removing block %u --- now %s\n", vec[i],
ext2fs_badblocks_list_test(bb, vec[i]) ?
"present" : "absent");
if (match) {
@@ -209,7 +209,7 @@ static void invalid_proc(ext2_filsys fs,
printf("Expected invalid block\n");
test_expected_fail++;
} else {
- printf("Invalid block #: %d\n", blk);
+ printf("Invalid block #: %u\n", blk);
test_fail++;
}
}
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/tst_getsize.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/tst_getsize.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/tst_getsize.c
@@ -39,6 +39,6 @@ int main(int argc, const char *argv[])
com_err(argv[0], retval, "while getting device size");
exit(1);
}
- printf("%s is device has %d blocks.\n", argv[1], blocks);
+ printf("%s is device has %u blocks.\n", argv[1], blocks);
return 0;
}
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/tst_iscan.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/tst_iscan.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/tst_iscan.c
@@ -175,7 +175,7 @@ static void check_map(void)
for (i=0; test_vec[i]; i++) {
if (ext2fs_test_block_bitmap(touched_map, test_vec[i])) {
- printf("Bad block was touched --- %d\n", test_vec[i]);
+ printf("Bad block was touched --- %u\n", test_vec[i]);
failed++;
first_no_comma = 1;
}
@@ -199,7 +199,7 @@ static void check_map(void)
first = 0;
else
printf(", ");
- printf("%d", i);
+ printf("%u", i);
}
}
printf("\n");
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/unix_io.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/unix_io.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/unix_io.c
@@ -170,8 +170,8 @@ static errcode_t raw_read_blk(io_channel
size = (count < 0) ? -count : count * channel->block_size;
location = ((ext2_loff_t) block * channel->block_size) + data->offset;
#ifdef DEBUG
- printf("count=%d, size=%d, block=%d, blk_size=%d, location=%lx\n",
- count, size, block, channel->block_size, location);
+ printf("count=%d, size=%d, block=%lu, blk_size=%d, location=%llx\n",
+ count, size, block, channel->block_size, (long long)location);
#endif
if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
@@ -553,7 +553,7 @@ static errcode_t unix_read_blk(io_channe
/* If it's in the cache, use it! */
if ((cache = find_cached_block(data, block, &reuse[0]))) {
#ifdef DEBUG
- printf("Using cached block %d\n", block);
+ printf("Using cached block %lu\n", block);
#endif
memcpy(cp, cache->buf, channel->block_size);
count--;
@@ -569,7 +569,7 @@ static errcode_t unix_read_blk(io_channe
if (find_cached_block(data, block+i, &reuse[i]))
break;
#ifdef DEBUG
- printf("Reading %d blocks starting at %d\n", i, block);
+ printf("Reading %d blocks starting at %lu\n", i, block);
#endif
if ((retval = raw_read_blk(channel, data, block, i, cp)))
return retval;
Index: e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/write_bb_file.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/lib/ext2fs/write_bb_file.c
+++ e2fsprogs-1.39-my-patches-from-ted/lib/ext2fs/write_bb_file.c
@@ -27,7 +27,7 @@ errcode_t ext2fs_write_bb_FILE(ext2_badb
return retval;
while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
- fprintf(f, "%d\n", blk);
+ fprintf(f, "%u\n", blk);
}
ext2fs_badblocks_list_iterate_end(bb_iter);
return 0;
Index: e2fsprogs-1.39-my-patches-from-ted/misc/ChangeLog
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/misc/ChangeLog
+++ e2fsprogs-1.39-my-patches-from-ted/misc/ChangeLog
@@ -1,5 +1,11 @@
2006-08-30 Eric Sandeen <esandeen@redhat.com>
+ * dumpe2fs.c (list_bad_blocks):
+ * e2image.c (output_meta_data_blocks, write_raw_image_file):
+ * mke2fs.c (test_disk, handle_bad_blocks): Fix printf formats.
+
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
* e2image.c (mark_table_blocks): Remove unused first_block
incrementing from loop.
Index: e2fsprogs-1.39-my-patches-from-ted/misc/dumpe2fs.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/misc/dumpe2fs.c
+++ e2fsprogs-1.39-my-patches-from-ted/misc/dumpe2fs.c
@@ -250,10 +250,10 @@ static void list_bad_blocks(ext2_filsys
return;
}
if (dump) {
- header = fmt = "%d\n";
+ header = fmt = "%u\n";
} else {
- header = _("Bad blocks: %d");
- fmt = ", %d";
+ header = _("Bad blocks: %u");
+ fmt = ", %u";
}
while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
printf(header ? header : fmt, blk);
Index: e2fsprogs-1.39-my-patches-from-ted/misc/e2image.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/misc/e2image.c
+++ e2fsprogs-1.39-my-patches-from-ted/misc/e2image.c
@@ -417,7 +417,7 @@ static void output_meta_data_blocks(ext2
retval = io_channel_read_blk(fs->io, blk, 1, buf);
if (retval) {
com_err(program_name, retval,
- "error reading block %d", blk);
+ "error reading block %u", blk);
}
if (scramble_block_map &&
ext2fs_test_block_bitmap(scramble_block_map, blk))
@@ -516,7 +516,7 @@ static void write_raw_image_file(ext2_fi
block_buf, process_dir_block, &pb);
if (retval) {
com_err(program_name, retval,
- "while iterating over inode %d",
+ "while iterating over inode %u",
ino);
exit(1);
}
@@ -529,7 +529,7 @@ static void write_raw_image_file(ext2_fi
process_file_block, &pb);
if (retval) {
com_err(program_name, retval,
- "while iterating over %d", ino);
+ "while iterating over inode %u", ino);
exit(1);
}
}
Index: e2fsprogs-1.39-my-patches-from-ted/misc/mke2fs.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/misc/mke2fs.c
+++ e2fsprogs-1.39-my-patches-from-ted/misc/mke2fs.c
@@ -188,7 +188,7 @@ static void test_disk(ext2_filsys fs, ba
errcode_t retval;
char buf[1024];
- sprintf(buf, "badblocks -b %d -X %s%s%s %d", fs->blocksize,
+ sprintf(buf, "badblocks -b %d -X %s%s%s %u", fs->blocksize,
quiet ? "" : "-s ", (cflag > 1) ? "-w " : "",
fs->device_name, fs->super->s_blocks_count);
if (verbose)
@@ -232,7 +232,7 @@ static void handle_bad_blocks(ext2_filsy
if (ext2fs_badblocks_list_test(bb_list, i)) {
fprintf(stderr, _("Block %d in primary "
"superblock/group descriptor area bad.\n"), i);
- fprintf(stderr, _("Blocks %u through %d must be good "
+ fprintf(stderr, _("Blocks %u through %u must be good "
"in order to build a filesystem.\n"),
fs->super->s_first_data_block, must_be_good);
fputs(_("Aborting....\n"), stderr);
Index: e2fsprogs-1.39-my-patches-from-ted/resize/ChangeLog
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/resize/ChangeLog
+++ e2fsprogs-1.39-my-patches-from-ted/resize/ChangeLog
@@ -1,5 +1,9 @@
2006-08-30 Eric Sandeen <esandeen@redhat.com>
+ * online.c (online_resize_fs): Fix printf formats.
+
+2006-08-30 Eric Sandeen <esandeen@redhat.com>
+
* resize2fs.c (mark_table_blocks): Remove unused variable.
2006-08-30 Theodore Tso <tytso@mit.edu>
Index: e2fsprogs-1.39-my-patches-from-ted/resize/online.c
===================================================================
--- e2fsprogs-1.39-my-patches-from-ted.orig/resize/online.c
+++ e2fsprogs-1.39-my-patches-from-ted/resize/online.c
@@ -74,7 +74,7 @@ errcode_t online_resize_fs(ext2_filsys f
if (retval)
return retval;
- printf(_("Performing an on-line resize of %s to %d (%dk) blocks.\n"),
+ printf(_("Performing an on-line resize of %s to %u (%dk) blocks.\n"),
fs->device_name, *new_size, fs->blocksize / 1024);
size = fs->group_desc_count * sb->s_blocks_per_group +
@@ -116,7 +116,7 @@ errcode_t online_resize_fs(ext2_filsys f
printf("new inode table is at 0x%04x-0x%04x\n",
input.inode_table,
input.inode_table + new_fs->inode_blocks_per_group-1);
- printf("new group has %d blocks\n", input.blocks_count);
+ printf("new group has %u blocks\n", input.blocks_count);
printf("new group will reserve %d blocks\n",
input.reserved_blocks);
printf("new group has %d free blocks\n",