from Benno Schulenberg.
Add missing _() so all strings can be internationalized.
+2005-06-20 Theodore Ts'o <tytso@mit.edu>
+
+ * unix.c (usage, parse_extended_opts): Clean up messages printed
+ by e2fsck for grammer and consistency.
+
2005-06-19 Theodore Ts'o <tytso@mit.edu>
* e2fsck.8.in: Make it clear that the -c, -l, and -L options are
fprintf(stderr,
_("Usage: %s [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]\n"
"\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n"
- "\t\t[-l|-L bad_blocks_file] [-C fd] [-j ext-journal]\n"
+ "\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n"
"\t\t[-E extended-options] device\n"),
ctx->program_name);
" -v Be verbose\n"
" -b superblock Use alternative superblock\n"
" -B blocksize Force blocksize when looking for superblock\n"
- " -j external-journal Set location of the external journal\n"
+ " -j external_journal Set location of the external journal\n"
" -l bad_blocks_file Add to badblocks list\n"
" -L bad_blocks_file Set badblocks list\n"
));
continue;
}
ctx->ext_attr_ver = ea_ver;
- } else
+ } else {
+ fprintf(stderr, _("Unknown extended option: %s\n"),
+ token);
extended_usage++;
+ }
}
if (extended_usage) {
- fprintf(stderr, _("Extended options are separated by commas, "
- "and may take an argument which\n"
- "is set off by an equals ('=') sign. "
- "Valid raid options are:\n"
- "\tea_ver=<ea_version (1 or 2)\n\n"));
+ fputs(("\nExtended options are separated by commas, "
+ "and may take an argument which\n"
+ "is set off by an equals ('=') sign. "
+ "Valid extended options are:\n"
+ "\tea_ver=<ea_version (1 or 2)>\n\n"), stderr);
exit(1);
}
}
2005-06-20 Theodore Ts'o <tytso@mit.edu>
+ * partinfo.c: Add ioctl definition for BLKGETSIZE so it can be
+ compiled cleanly.
+
+ * findsuper.c: Fix up comments for grammar.
+
+ * dumpe2fs.c (print_journal_information), partinfo.c (main): Add
+ missing _() so all strings can be internationalized.
+
+ * badblocks.c (main), mke2fs.c (parse_extended_opts, PRS),
+ partinfo.c (main), tune2fs.c (usage): Clean up printed
+ messages for grammar and consistency.
+
* e2image.8.in: Clean up e2image man page, mostly based on
suggestions from Benno Schulenberg.
errcode = ext2fs_badblocks_list_create(&bb_list,0);
if (errcode) {
com_err (program_name, errcode,
- _("creating in-memory bad blocks list"));
+ _("while creating in-memory bad blocks list"));
exit (1);
}
default:
errcode = ext2fs_badblocks_list_add(bb_list,next_bad);
if (errcode) {
- com_err (program_name, errcode, _("adding to in-memory bad block list"));
+ com_err (program_name, errcode, _("while adding to in-memory bad block list"));
exit (1);
}
continue;
for (i=0; i < ntohl(jsb->s_nr_users); i++) {
uuid_unparse(&jsb->s_users[i*16], str);
printf(i ? " %s\n"
- : "Journal users: %s\n",
+ : _("Journal users: %s\n"),
str);
}
}
* Documentation addendum added by Andreas dwguest@win.tue.nl/aeb@cwi.nl
*
* The program findsuper is a utility that scans a disk and finds
- * copies of ext2 superblocks (by checking for the ext2 signature
+ * copies of ext2 superblocks (by checking for the ext2 signature).
*
* For each superblock found, it prints the offset in bytes, the
- * offset in 1024-byte blocks, the size of ext2 partition in fs
+ * offset in 1024-byte blocks, the size of the ext2 partition in fs
* blocks, the filesystem blocksize (in bytes), the block group number
* (always 0 for older ext2 systems), and a timestamp (s_mtime).
*
}
if (r_usage) {
fprintf(stderr, _("\nBad options specified.\n\n"
- "Options are separated by commas, "
+ "Extended options are separated by commas, "
"and may take an argument which\n"
"\tis set off by an equals ('=') sign.\n\n"
- "Valid raid options are:\n"
+ "Valid extended options are:\n"
"\tstride=<stride length in blocks>\n"
"\tresize=<resize maximum size in blocks>\n\n"));
exit(1);
if (size < EXT2_MIN_BLOCK_SIZE ||
size > EXT2_MAX_BLOCK_SIZE || *tmp) {
com_err(program_name, 0,
- _("bad fragment size - %s"),
+ _("invalid fragment size - %s"),
optarg);
exit(1);
}
inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024 ||
*tmp) {
com_err(program_name, 0,
- _("bad inode ratio %s (min %d/max %d)"),
+ _("invalid inode ratio %s (min %d/max %d)"),
optarg, EXT2_MIN_BLOCK_SIZE,
EXT2_MAX_BLOCK_SIZE);
exit(1);
reserved_ratio = strtoul(optarg, &tmp, 0);
if (reserved_ratio > 50 || *tmp) {
com_err(program_name, 0,
- _("bad reserved blocks percent - %s"),
+ _("invalid reserved blocks percent - %s"),
optarg);
exit(1);
}
inode_size = strtoul(optarg, &tmp, 0);
if (*tmp) {
com_err(program_name, 0,
- _("bad inode size - %s"), optarg);
+ _("invalid inode size - %s"), optarg);
exit(1);
}
break;
}
if ((blocksize > 4096) &&
(param.s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
- fprintf(stderr, "\nWarning: some 2.4 kernels do not support "
- "blocksizes greater than 4096 \n\tusing ext3."
- " Use -b 4096 if this is an issue for you.\n\n");
+ fprintf(stderr, _("\nWarning: some 2.4 kernels do not support "
+ "blocksizes greater than 4096\n\tusing ext3. "
+ "Use -b 4096 if this is an issue for you.\n\n"));
if (optind < argc) {
param.s_blocks_count = parse_num_blocks(argv[optind++],
inode_size > EXT2_BLOCK_SIZE(¶m) ||
inode_size & (inode_size - 1)) {
com_err(program_name, 0,
- _("bad inode size %d (min %d/max %d)"),
+ _("invalid inode size %d (min %d/max %d)"),
inode_size, EXT2_GOOD_OLD_INODE_SIZE,
blocksize);
exit(1);
#include <sys/types.h>
#include <fcntl.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
#include <stdio.h>
#include <linux/hdreg.h>
#include <unistd.h>
#include <errno.h>
#include "nls-enable.h"
+#if defined(__linux__) && defined(_IO) && !defined(BLKGETSIZE)
+#define BLKGETSIZE _IO(0x12,96) /* return device size */
+#endif
+
void print_error(char *operation, int error, char *device)
{
fprintf(stderr, _("%s failed for %s: %s\n"), operation, device,
textdomain(NLS_CAT_NAME);
#endif
if (argc == 1) {
- fprintf(stderr, _("Usage: %s <dev1> <dev2> <dev3>\n\n"
- "This program prints out the partition information "
- "for a set of devices\n"
- "A common way to use this program is:\n\n\t"
- "%s /dev/hda?\n\n"), argv[0], argv[0]);
+ fprintf(stderr, _("Usage: %s device...\n\nPrints out the"
+ "partition information for each given device.\n"),
+ "For example: %s /dev/hda\n\n", argv[0], argv[0]);
exit(1);
}
fd = open(argv[i], O_RDONLY);
if (fd < 0) {
- print_error("open", errno, argv[i]);
+ print_error(_("open"), errno, argv[i]);
continue;
}
static void usage(void)
{
fprintf(stderr,
- _("Usage: %s [-c max-mounts-count] [-e errors-behavior] "
+ _("Usage: %s [-c max_mounts_count] [-e errors_behavior] "
"[-g group]\n"
- "\t[-i interval[d|m|w]] [-j] [-J journal-options]\n"
- "\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
- "\t[-o [^]mount-options[,...]] [-r reserved-blocks-count]\n"
- "\t[-u user] [-C mount-count] [-L volume-label] "
- "[-M last-mounted-dir]\n"
- "\t[-O [^]feature[,...]] [-T last-check-time] [-U UUID]"
+ "\t[-i interval[d|m|w]] [-j] [-J journal_options]\n"
+ "\t[-l] [-s sparse_flag] [-m reserved_blocks_percent]\n"
+ "\t[-o [^]mount_options[,...]] [-r reserved_blocks_count]\n"
+ "\t[-u user] [-C mount_count] [-L volume_label] "
+ "[-M last_mounted_dir]\n"
+ "\t[-O [^]feature[,...]] [-T last_check_time] [-U UUID]"
" device\n"), program_name);
exit (1);
}