diff options
-rw-r--r-- | util-linux/nfsmount.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index 4ab415f0f..619add483 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -502,19 +502,18 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
502 | else if (!strncmp(opteq+1, "udp", 3)) | 502 | else if (!strncmp(opteq+1, "udp", 3)) |
503 | tcp = 0; | 503 | tcp = 0; |
504 | else | 504 | else |
505 | printf(_("Warning: Unrecognized proto= option.\n")); | 505 | printf("Warning: Unrecognized proto= option.\n"); |
506 | } else if (!strcmp(opt, "namlen")) { | 506 | } else if (!strcmp(opt, "namlen")) { |
507 | #if NFS_MOUNT_VERSION >= 2 | 507 | #if NFS_MOUNT_VERSION >= 2 |
508 | if (nfs_mount_version >= 2) | 508 | if (nfs_mount_version >= 2) |
509 | data.namlen = val; | 509 | data.namlen = val; |
510 | else | 510 | else |
511 | #endif | 511 | #endif |
512 | printf(_("Warning: Option namlen is not supported.\n")); | 512 | printf("Warning: Option namlen is not supported.\n"); |
513 | } else if (!strcmp(opt, "addr")) | 513 | } else if (!strcmp(opt, "addr")) |
514 | /* ignore */; | 514 | /* ignore */; |
515 | else { | 515 | else { |
516 | printf(_("unknown nfs mount parameter: " | 516 | printf("unknown nfs mount parameter: %s=%d\n", opt, val); |
517 | "%s=%d\n"), opt, val); | ||
518 | goto fail; | 517 | goto fail; |
519 | } | 518 | } |
520 | } | 519 | } |
@@ -548,10 +547,9 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
548 | if (nfs_mount_version >= 3) | 547 | if (nfs_mount_version >= 3) |
549 | nolock = !val; | 548 | nolock = !val; |
550 | else | 549 | else |
551 | printf(_("Warning: option nolock is not supported.\n")); | 550 | printf("Warning: option nolock is not supported.\n"); |
552 | } else { | 551 | } else { |
553 | printf(_("unknown nfs mount option: " | 552 | printf("unknown nfs mount option: %s%s\n", val ? "" : "no", opt); |
554 | "%s%s\n"), val ? "" : "no", opt); | ||
555 | goto fail; | 553 | goto fail; |
556 | } | 554 | } |
557 | } | 555 | } |
@@ -809,18 +807,18 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
809 | 807 | ||
810 | if (tcp) { | 808 | if (tcp) { |
811 | if (nfs_mount_version < 3) { | 809 | if (nfs_mount_version < 3) { |
812 | printf(_("NFS over TCP is not supported.\n")); | 810 | printf("NFS over TCP is not supported.\n"); |
813 | goto fail; | 811 | goto fail; |
814 | } | 812 | } |
815 | fsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); | 813 | fsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); |
816 | } else | 814 | } else |
817 | fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); | 815 | fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); |
818 | if (fsock < 0) { | 816 | if (fsock < 0) { |
819 | perror(_("nfs socket")); | 817 | perror("nfs socket"); |
820 | goto fail; | 818 | goto fail; |
821 | } | 819 | } |
822 | if (bindresvport(fsock, 0) < 0) { | 820 | if (bindresvport(fsock, 0) < 0) { |
823 | perror(_("nfs bindresvport")); | 821 | perror("nfs bindresvport"); |
824 | goto fail; | 822 | goto fail; |
825 | } | 823 | } |
826 | if (port == 0) { | 824 | if (port == 0) { |
@@ -831,11 +829,11 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
831 | port = NFS_PORT; | 829 | port = NFS_PORT; |
832 | #ifdef NFS_MOUNT_DEBUG | 830 | #ifdef NFS_MOUNT_DEBUG |
833 | else | 831 | else |
834 | printf(_("used portmapper to find NFS port\n")); | 832 | printf("used portmapper to find NFS port\n"); |
835 | #endif | 833 | #endif |
836 | } | 834 | } |
837 | #ifdef NFS_MOUNT_DEBUG | 835 | #ifdef NFS_MOUNT_DEBUG |
838 | printf(_("using port %d for nfs daemon\n"), port); | 836 | printf("using port %d for nfs daemon\n", port); |
839 | #endif | 837 | #endif |
840 | server_addr.sin_port = htons(port); | 838 | server_addr.sin_port = htons(port); |
841 | /* | 839 | /* |
@@ -846,7 +844,7 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
846 | if (get_linux_version_code() <= KERNEL_VERSION(2,3,10) | 844 | if (get_linux_version_code() <= KERNEL_VERSION(2,3,10) |
847 | && connect(fsock, (struct sockaddr *) &server_addr, | 845 | && connect(fsock, (struct sockaddr *) &server_addr, |
848 | sizeof (server_addr)) < 0) { | 846 | sizeof (server_addr)) < 0) { |
849 | perror(_("nfs connect")); | 847 | perror("nfs connect"); |
850 | goto fail; | 848 | goto fail; |
851 | } | 849 | } |
852 | 850 | ||
@@ -936,7 +934,7 @@ static char *nfs_strerror(int status) | |||
936 | if (nfs_errtbl[i].stat == status) | 934 | if (nfs_errtbl[i].stat == status) |
937 | return strerror(nfs_errtbl[i].errnum); | 935 | return strerror(nfs_errtbl[i].errnum); |
938 | } | 936 | } |
939 | sprintf(buf, _("unknown nfs status return value: %d"), status); | 937 | sprintf(buf, "unknown nfs status return value: %d", status); |
940 | return buf; | 938 | return buf; |
941 | } | 939 | } |
942 | 940 | ||