diff options
author | Takashi Sato <sho@tnes.nec.co.jp> | 2006-03-18 21:43:46 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2006-03-18 21:43:46 -0500 |
commit | 8deb80a5d1078cbe43eaffcdeebf0a1a549d6a54 (patch) | |
tree | eea03c80759a330ae1f4500288b2c197b2e05adc /resize | |
parent | 5d2ef12f6ed4c35c7e6baa7cb83ced738a3f1976 (diff) | |
download | e2fsprogs-8deb80a5d1078cbe43eaffcdeebf0a1a549d6a54.tar.gz |
Fix format statements to make e2fsprogs programs 32-bit clean
Change the format string(%d, %ld) for a block number and inode number
to %u or %lu.
Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'resize')
-rw-r--r-- | resize/ChangeLog | 3 | ||||
-rw-r--r-- | resize/main.c | 10 | ||||
-rw-r--r-- | resize/resize2fs.c | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/resize/ChangeLog b/resize/ChangeLog index 6b727e9c..3a972d59 100644 --- a/resize/ChangeLog +++ b/resize/ChangeLog @@ -1,5 +1,8 @@ 2006-03-18 Theodore Ts'o <tytso@mit.edu> + * main.c, resize2fs.c: Change printf statements to use %u instead + of %d when printing block numbers. + * main.c (main): If the filesystem is mounted, open it in read-only mode since the userspace program should not try to modify it directly. If the filesystem is not mounted, diff --git a/resize/main.c b/resize/main.c index e202c5f7..0632c07e 100644 --- a/resize/main.c +++ b/resize/main.c @@ -311,13 +311,13 @@ int main (int argc, char ** argv) } if (!force && (new_size > max_size)) { fprintf(stderr, _("The containing partition (or device)" - " is only %d (%dk) blocks.\nYou requested a new size" - " of %d blocks.\n\n"), max_size, + " is only %u (%dk) blocks.\nYou requested a new size" + " of %u blocks.\n\n"), max_size, fs->blocksize / 1024, new_size); exit(1); } if (new_size == fs->super->s_blocks_count) { - fprintf(stderr, _("The filesystem is already %d blocks " + fprintf(stderr, _("The filesystem is already %u blocks " "long. Nothing to do!\n\n"), new_size); exit(0); } @@ -332,7 +332,7 @@ int main (int argc, char ** argv) device_name); exit(1); } - printf("Resizing the filesystem on %s to %d (%dk) blocks.\n", + printf("Resizing the filesystem on %s to %u (%dk) blocks.\n", device_name, new_size, fs->blocksize / 1024); retval = resize_fs(fs, &new_size, flags, ((flags & RESIZE_PERCENT_COMPLETE) ? @@ -344,7 +344,7 @@ int main (int argc, char ** argv) ext2fs_close (fs); exit(1); } - printf(_("The filesystem on %s is now %d blocks long.\n\n"), + printf(_("The filesystem on %s is now %u blocks long.\n\n"), device_name, new_size); if ((st_buf.st_size > new_file_size) && diff --git a/resize/resize2fs.c b/resize/resize2fs.c index d920bef6..de8f00dc 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -108,7 +108,7 @@ errcode_t resize_fs(ext2_filsys fs, blk_t *new_size, int flags, #ifdef RESIZE2FS_DEBUG if (rfs->flags & RESIZE_DEBUG_BMOVE) - printf("Number of free blocks: %d/%d, Needed: %d\n", + printf("Number of free blocks: %u/%u, Needed: %d\n", rfs->old_fs->super->s_free_blocks_count, rfs->new_fs->super->s_free_blocks_count, rfs->needed_blocks); |