diff options
author | Steve Dickson <steved@redhat.com> | 2016-01-20 14:16:08 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-01-20 14:16:08 -0500 |
commit | 6ec0d58fbff7c1a814a21cf8c7fe0ef5106a04c1 (patch) | |
tree | c85a7090aaf3e4a35a2d2f2f046cbc8619f31636 | |
parent | 0c43a3e1ce8b2103e9c89aea0322367a22d6a491 (diff) | |
download | nfs-utils-6ec0d58fbff7c1a814a21cf8c7fe0ef5106a04c1.tar.gz nfs-utils-6ec0d58fbff7c1a814a21cf8c7fe0ef5106a04c1.tar.xz nfs-utils-6ec0d58fbff7c1a814a21cf8c7fe0ef5106a04c1.zip |
mountd: print an error message when no versions are specified
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/mountd/mountd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 8aca181..b584afc 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -794,9 +794,10 @@ main(int argc, char **argv) } /* No more arguments allowed. */ - if (optind != argc || !version_any()) + if (optind != argc || !version_any()) { + fprintf(stderr, "%s: No protocol versions specified!\n", progname); usage(progname, 1); - + } if (chdir(state_dir)) { fprintf(stderr, "%s: chdir(%s) failed: %s\n", progname, state_dir, strerror(errno)); |