diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-08-03 13:23:29 -0400 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-08-04 08:27:39 +1000 |
commit | 53a9b4a2ea971d5718ccfcc2f2825ff9af81cd23 (patch) | |
tree | f47a54c21336589b8cc3db3e6c28b70790e2a6a4 /utils/mount/error.c | |
parent | 9b640cdaa36e25e0f6e14a7a53237488717d4187 (diff) | |
download | nfs-utils-53a9b4a2ea971d5718ccfcc2f2825ff9af81cd23.tar.gz nfs-utils-53a9b4a2ea971d5718ccfcc2f2825ff9af81cd23.tar.xz nfs-utils-53a9b4a2ea971d5718ccfcc2f2825ff9af81cd23.zip |
mount.nfs: Support double-wide characters in printed strings
Previous NLS changes missed a spot or two. This patch tries to get
most of them, but probably misses a few more.
In errors.c:mount_errors() I've removed a period at the end of the error
messages; this is consistent with other error messages I've examined.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/mount/error.c')
-rw-r--r-- | utils/mount/error.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/utils/mount/error.c b/utils/mount/error.c index bf056af..cab84c9 100644 --- a/utils/mount/error.c +++ b/utils/mount/error.c @@ -67,9 +67,11 @@ static int rpc_strerror(int spos) tmp = &errbuf[spos]; if (cf_stat == RPC_SYSTEMERROR) pos = snprintf(tmp, (erreob - tmp), - "System Error: %s", strerror(cf_errno)); + _("System Error: %s"), + strerror(cf_errno)); else - pos = snprintf(tmp, (erreob - tmp), "RPC Error:%s", estr); + pos = snprintf(tmp, (erreob - tmp), + _("RPC Error:%s"), estr); } return pos; } @@ -83,30 +85,40 @@ void mount_errors(char *server, int will_retry, int bg) tmp = &errbuf[pos]; if (bg) pos = snprintf(tmp, (erreob - tmp), - "mount to NFS server '%s' failed: ", server); + _("mount to NFS server '%s' failed: "), + server); else pos = snprintf(tmp, (erreob - tmp), - "%s: mount to NFS server '%s' failed: ", - progname, server); + _("%s: mount to NFS server '%s' failed: "), + progname, server); tmp = &errbuf[pos]; if (rpc_createerr.cf_stat == RPC_TIMEDOUT) { - pos = snprintf(tmp, (erreob - tmp), "timed out %s", - will_retry ? "(retrying)" : "(giving up)"); + if (will_retry) + pos = snprintf(tmp, (erreob - tmp), + _("timed out, retrying")); + else + pos = snprintf(tmp, (erreob - tmp), + _("timed out, giving up")); } else { pos += rpc_strerror(pos); tmp = &errbuf[pos]; if (bg) { - pos = snprintf(tmp, (erreob - tmp), " %s", - will_retry ? "(retrying)" : "(giving up)"); + if (will_retry) + pos = snprintf(tmp, (erreob - tmp), + _(", retrying")); + else + pos = snprintf(tmp, (erreob - tmp), + _(", giving up")); } } + if (bg) { if (onlyonce++ < 1) openlog("mount", LOG_CONS|LOG_PID, LOG_AUTH); - syslog(LOG_ERR, "%s.", errbuf); + syslog(LOG_ERR, "%s", errbuf); } else - fprintf(stderr, "%s.\n", errbuf); + fprintf(stderr, "%s\n", errbuf); } void mount_error(const char *spec, const char *mount_point, int error) |