diff options
author | Karel Zak | 2006-12-07 00:25:39 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:39 +0100 |
commit | 7eda085c41faa3445b4b168ce78ab18dab87d98a (patch) | |
tree | eb8da4baebd0af68fa84818d3d51b4a3714667fc /disk-utils/mkfs.c | |
parent | Imported from util-linux-2.9i tarball. (diff) | |
download | kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.tar.gz kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.tar.xz kernel-qcow2-util-linux-7eda085c41faa3445b4b168ce78ab18dab87d98a.zip |
Imported from util-linux-2.9v tarball.
Diffstat (limited to 'disk-utils/mkfs.c')
-rw-r--r-- | disk-utils/mkfs.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c index ba293e939..9ea27a504 100644 --- a/disk-utils/mkfs.c +++ b/disk-utils/mkfs.c @@ -10,6 +10,9 @@ * * Mon Jul 1 18:52:58 1996: janl@math.uio.no (Nicolai Langfeldt): * Incorporated fix by Jonathan Kamens <jik@annex-1-slip-jik.cam.ov.com> + * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org> + * - added Native Language Support + * */ @@ -19,9 +22,10 @@ #include <string.h> #include <getopt.h> #include <limits.h> +#include "nls.h" - -#define VERSION "1.10" +#include "../version.h" +#define VERSION UTIL_LINUX_VERSION #ifndef DEFAULT_FSTYPE # define DEFAULT_FSTYPE "ext2" @@ -38,6 +42,10 @@ int main(int argc, char *argv[]) int i, more = 0, verbose = 0; char *oldpath, *newpath; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + /* Check commandline options. */ opterr = 0; while ((more == 0) && ((i = getopt(argc, argv, "Vt:")) != EOF)) @@ -55,7 +63,7 @@ int main(int argc, char *argv[]) } if (optind == argc) { fprintf(stderr, - "Usage: mkfs [-V] [-t fstype] [fs-options] device [size]\n"); + _("Usage: mkfs [-V] [-t fstype] [fs-options] device [size]\n")); return -1; } @@ -69,7 +77,7 @@ int main(int argc, char *argv[]) oldpath = "/bin"; newpath = (char *) malloc(strlen(oldpath) + sizeof(SEARCH_PATH) + 2); if (!newpath) { - fputs("mkfs: out of memory\n", stderr); + fprintf(stderr, _("%s: Out of memory!\n"), "mkfs"); exit(1); } sprintf(newpath, "%s:%s\n", SEARCH_PATH, oldpath); @@ -78,7 +86,7 @@ int main(int argc, char *argv[]) argv[--optind] = progname; if (verbose) { - puts("mkfs version " VERSION " (" __DATE__ ")"); + puts(_("mkfs version " VERSION " (" __DATE__ ")")); i = optind; while (argv[i]) printf("%s ", argv[i++]); |