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 aaf8d29..c97c81f 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;