From f37ab68a26bacf4f5cc7643b8373e40292b7682a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 5 May 2005 23:15:55 -0400 Subject: [PATCH] Corrects a few mistakes in the fsck man page, wraps two overlong lines, and changes "bad" to "invalid" in some messages to avoid confusion with "bad blocks" in the e2fsck, mke2fs, and badblocks programs. Thanks to Benno Schulenberg. (Addresses Sourceforge Bug: #1189803) --- e2fsck/ChangeLog | 6 ++++++ e2fsck/badblocks.c | 3 ++- misc/ChangeLog | 15 +++++++++++++++ misc/badblocks.c | 6 +++--- misc/fsck.8.in | 15 ++++++++------- misc/mke2fs.c | 12 +++++++----- 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 7ecb7d17..0288b8c9 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,9 @@ +2005-05-05 Theodore Ts'o + + * badblocks.c (check_bb_inode_blocks): Clean up warning printf. + Thanks to Benno Schulenberg for the patch. (Addresses + Sourceforge Bug: #1189803) + 2005-04-16 Theodore Ts'o * e2fsck.8.in: Fix spelling mistakes in man pages. (Addresses diff --git a/e2fsck/badblocks.c b/e2fsck/badblocks.c index 09ef3ab1..9ac51177 100644 --- a/e2fsck/badblocks.c +++ b/e2fsck/badblocks.c @@ -126,7 +126,8 @@ static int check_bb_inode_blocks(ext2_filsys fs, */ if (*block_nr >= fs->super->s_blocks_count || *block_nr < fs->super->s_first_data_block) { - printf(_("Warning illegal block %u found in bad block inode. Cleared.\n"), *block_nr); + printf(_("Warning: illegal block %u found in bad block inode. " + "Cleared.\n"), *block_nr); *block_nr = 0; return BLOCK_CHANGED; } diff --git a/misc/ChangeLog b/misc/ChangeLog index afb3b74c..3693135a 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,20 @@ 2005-05-05 Theodore Ts'o + * badblocks.c (main), mke2fs.c (PRS): Fix error messages by + substituting "bad" with "invalid" to avoid confusion with + "bad blocks". Thanks to Benno Schulenberg for the patch. + (Addresses Sourceforge Bug: #1189803) + + * mke2fs.c (test_disk): Fix grammatical error in error message. + Thanks to Benno Schulenberg. + + * mke2fs.c (parse_extended_opts): Print the invalid stride + parameter in the error message. Thanks to Benno + Schulenberg. + + * fsck.8.in: Fix a few spelling/grammatical errors. Thanks to + Benno Schulenberg. + * filefrag.c (frag_report): Fix so that when the first block to be found is an indirect block, we don't falsely count an extra discontinuity. (Addresses Debian Bug: #307607) diff --git a/misc/badblocks.c b/misc/badblocks.c index 1c8f7323..00016e5b 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -967,7 +967,7 @@ int main (int argc, char ** argv) } else { last_block = strtoul (argv[optind], &tmp, 0); if (*tmp) { - com_err (program_name, 0, _("bad blocks count - %s"), + com_err (program_name, 0, _("invalid blocks count - %s"), argv[optind]); exit (1); } @@ -976,13 +976,13 @@ int main (int argc, char ** argv) if (optind <= argc-1) { from_count = strtoul (argv[optind], &tmp, 0); if (*tmp) { - com_err (program_name, 0, _("bad starting block - %s"), + com_err (program_name, 0, _("invalid starting block - %s"), argv[optind]); exit (1); } } else from_count = 0; if (from_count >= last_block) { - com_err (program_name, 0, _("bad blocks range: %lu-%lu"), + com_err (program_name, 0, _("invalid blocks range: %lu-%lu"), (unsigned long) from_count, (unsigned long) last_block); exit (1); } diff --git a/misc/fsck.8.in b/misc/fsck.8.in index c6babcc6..f7bad726 100644 --- a/misc/fsck.8.in +++ b/misc/fsck.8.in @@ -36,8 +36,9 @@ or an ext2 label or UUID specifier (e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the .B fsck -program will try to run filesystems on different physical disk drives -in parallel to reduce total amount time to check all of the filesystems. +program will try to handle filesystems on different physical disk drives +in parallel to reduce the total amount of time needed to check all of the +filesystems. .PP If no filesystems are specified on the command line, and the .B \-A @@ -45,7 +46,7 @@ option is not specified, .B fsck will default to checking filesystems in .B /etc/fstab -serial. This is equivalent to the +serially. This is equivalent to the .B \-As options. .PP @@ -127,7 +128,7 @@ in .I fslist will be checked. .sp -Options specifiers may be included in the comma separated +Options specifiers may be included in the comma-separated .IR fslist . They must have the format .BI opts= fs-option\fR. @@ -213,7 +214,7 @@ Hence, a very common configuration in files is to set the root filesystem to have a .I fs_passno value of 1 -and to set all filesystems to have a +and to set all other filesystems to have a .I fs_passno value of 2. This will allow .B fsck @@ -230,7 +231,7 @@ only for ext2 and ext3) which support them. Fsck will manage the filesystem checkers so that only one of them will display a progress bar at a time. GUI front-ends may specify a file descriptor .IR fd , -in which case the progress bar information will be sent that file descriptor. +in which case the progress bar information will be sent to that file descriptor. .TP .B \-N Don't execute, just show what would be done. @@ -388,7 +389,7 @@ environment are searched. This environment variable allows the system administrator to override the standard location of the .B /etc/fstab -file. It is also use for developers who are testing +file. It is also useful for developers who are testing .BR fsck . .SH SEE ALSO .BR fstab (5), diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 18e7e76f..5f29a852 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -266,7 +266,7 @@ static void test_disk(ext2_filsys fs, badblocks_list *bb_list) f = popen(buf, "r"); if (!f) { com_err("popen", errno, - _("while trying run '%s'"), buf); + _("while trying to run '%s'"), buf); exit(1); } retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block); @@ -811,7 +811,8 @@ static void parse_extended_opts(struct ext2_super_block *param, fs_stride = strtoul(arg, &p, 0); if (*p || (fs_stride == 0)) { fprintf(stderr, - _("Invalid stride parameter.\n")); + _("Invalid stride parameter: %s\n"), + arg); r_usage++; continue; } @@ -838,7 +839,8 @@ static void parse_extended_opts(struct ext2_super_block *param, } if (resize <= param->s_blocks_count) { fprintf(stderr, - _("The resize maximum must be greater than the filesystem size.\n")); + _("The resize maximum must be greater " + "than the filesystem size.\n")); r_usage++; continue; } @@ -982,7 +984,7 @@ static void PRS(int argc, char *argv[]) if (b < EXT2_MIN_BLOCK_SIZE || b > EXT2_MAX_BLOCK_SIZE || *tmp) { com_err(program_name, 0, - _("bad block size - %s"), optarg); + _("invalid block size - %s"), optarg); exit(1); } if (blocksize > 4096) @@ -1218,7 +1220,7 @@ static void PRS(int argc, char *argv[]) param.s_blocks_count = parse_num_blocks(argv[optind++], param.s_log_block_size); if (!param.s_blocks_count) { - com_err(program_name, 0, _("bad blocks count - %s"), + com_err(program_name, 0, _("invalid blocks count - %s"), argv[optind - 1]); exit(1); }