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/setfdprm.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/setfdprm.c')
-rw-r--r-- | disk-utils/setfdprm.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/disk-utils/setfdprm.c b/disk-utils/setfdprm.c index 62234f3ac..7c2b0dc36 100644 --- a/disk-utils/setfdprm.c +++ b/disk-utils/setfdprm.c @@ -1,6 +1,10 @@ /* setfdprm.c - Sets user-provided floppy disk parameters, re-activates autodetection and switches diagnostic messages. */ +/* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org> + * - added Native Language Support + */ + #include <unistd.h> #include <stdlib.h> #include <stdio.h> @@ -10,6 +14,7 @@ #include <sys/stat.h> #include <sys/ioctl.h> #include <linux/fd.h> +#include "nls.h" #define FDPRMFILE "/etc/fdprm" #define MAXLINE 200 @@ -22,7 +27,7 @@ static int convert(char *arg) result = strtol(arg,&end,0); if (!*end) return (int) result; - fprintf(stderr,"Invalid number: %s\n",arg); + fprintf(stderr,_("Invalid number: %s\n"),arg); exit(1); } @@ -72,7 +77,7 @@ static void find_params(int cmd,int fd,char *name) if (sscanf(start,"%s %s %s %s %s %s %s %s %s %s",this,param[0], param[1],param[2],param[3],param[4],param[5],param[6],param[7], param[8]) != 10) { - fprintf(stderr,"Syntax error: '%s'\n",line); + fprintf(stderr,_("Syntax error: '%s'\n"),line); exit(1); } if (!strcmp(this,name)) { @@ -82,7 +87,7 @@ static void find_params(int cmd,int fd,char *name) } } } - fprintf(stderr,"No such parameter set: '%s'\n",name); + fprintf(stderr,_("No such parameter set: '%s'\n"),name); exit(1); } @@ -92,13 +97,13 @@ static void usage(char *name) char *this; if ((this = strrchr(name,'/')) != NULL) name = this+1; - fprintf(stderr,"usage: %s [ -p ] dev name\n",name); - fprintf(stderr," %s [ -p ] dev size sect heads tracks stretch \ -gap rate spec1 fmt_gap\n",name); + fprintf(stderr,_("usage: %s [ -p ] dev name\n"),name); + fprintf(stderr,_(" %s [ -p ] dev size sect heads tracks stretch \ +gap rate spec1 fmt_gap\n"),name); #ifdef FDMEDCNG - fprintf(stderr," %s [ -c | -y | -n | -d ] dev\n",name); + fprintf(stderr,_(" %s [ -c | -y | -n | -d ] dev\n"),name); #else - fprintf(stderr," %s [ -c | -y | -n ] dev\n",name); + fprintf(stderr,_(" %s [ -c | -y | -n ] dev\n"),name); #endif exit(1); } @@ -110,6 +115,10 @@ main(int argc,char **argv) unsigned int cmd; char *name; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + name = argv[0]; if (argc < 3) usage(name); cmd = FDSETPRM; |