]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
utils/nfsd: fix -N optarg error printout
authorBenny Halevy <bhalevy@panasas.com>
Wed, 15 Apr 2009 18:16:08 +0000 (14:16 -0400)
committerSteve Dickson <steved@redhat.com>
Wed, 15 Apr 2009 18:16:08 +0000 (14:16 -0400)
as currently printed c is the version number, not a string char,
therefore is should be printed as %d not %c.  That said, just print
optarg as %s since it might be non-numeric.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/nfsd/nfsd.c

index aaf8d298e3ad9c589c1d0d0c31df7cd64d36da27..c97c81f83f919d414734739904c44470825ae067 100644 (file)
@@ -86,7 +86,7 @@ main(int argc, char **argv)
                                NFSCTL_VERUNSET(versbits, c);
                                break;
                        default:
-                               fprintf(stderr, "%c: Unsupported version\n", c);
+                               fprintf(stderr, "%s: Unsupported version\n", optarg);
                                exit(1);
                        }
                        break;