diff options
author | Theodore Ts'o <tytso@mit.edu> | 2000-02-08 00:47:55 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2000-02-08 00:47:55 +0000 |
commit | d9c56d3ca0bee11e3446ff7e12e3124d28e298a7 (patch) | |
tree | 24305bb280a265ca959b23c265f71cb38c78a224 /misc/findsuper.c | |
parent | 0c4a07264e55b42c6e30230e66b1dea7d4b94ea9 (diff) | |
download | e2fsprogs-d9c56d3ca0bee11e3446ff7e12e3124d28e298a7.tar.gz |
Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2label.c, findsuper.c, fsck.c,
get_device_by_label.c, lsattr.c, mke2fs.c, mklost+found.c,
nls-enable.h, partinfo.c, tune2fs.c, uuidgen.c: Add
Internationalization support as suggested by Marco d'Itri
<md@linux.it>.
Diffstat (limited to 'misc/findsuper.c')
-rw-r--r-- | misc/findsuper.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/misc/findsuper.c b/misc/findsuper.c index 3a1ef3bd..4cca6cfc 100644 --- a/misc/findsuper.c +++ b/misc/findsuper.c @@ -68,6 +68,7 @@ #include <time.h> #include <linux/ext2_fs.h> +#include "nls-enable.h" main(int argc, char *argv[]) @@ -82,23 +83,28 @@ main(int argc, char *argv[]) struct ext2_super_block ext2; /* interesting fields: EXT2_SUPER_MAGIC * s_blocks_count s_log_block_size s_mtime s_magic s_lastcheck */ - + +#ifdef ENABLE_NLS + setlocale(LC_MESSAGES, ""); + bindtextdomain(NLS_CAT_NAME, LOCALEDIR); + textdomain(NLS_CAT_NAME); +#endif if (argc<2) { fprintf(stderr, - "Usage: findsuper device [skiprate [start]]\n"); + _("Usage: findsuper device [skiprate [start]]\n")); exit(1); } if (argc>2) skiprate=atoi(argv[2]); if (skiprate<512) { fprintf(stderr, - "Do you really want to skip less than a sector??\n"); + _("Do you really want to skip less than a sector??\n")); exit(2); } if (argc>3) sk=atol(argv[3]); if (sk<0) { - fprintf(stderr,"Have to start at 0 or greater,not %ld\n",sk); + fprintf(stderr,_("Have to start at 0 or greater,not %ld\n"),sk); exit(1); } f=fopen(argv[1],"r"); @@ -111,7 +117,7 @@ main(int argc, char *argv[]) printf(" thisoff block fs_blk_sz blksz grp last_mount\n"); for (;!feof(f) && (i=fseek(f,sk,SEEK_SET))!= -1; sk+=skiprate){ if (i=fread(&ext2,sizeof(ext2),1, f)!=1) { - perror("read failed"); + perror(_("read failed")); } if (ext2.s_magic != EXT2_SUPER_MAGIC) continue; @@ -124,6 +130,6 @@ main(int argc, char *argv[]) ext2.s_log_block_size, ext2.s_block_group_nr, s); } - printf("Failed on %d at %ld\n", i, sk); + printf(_("Failed on %d at %ld\n"), i, sk); fclose(f); } |