Blame SOURCES/nfs-utils-1.3.0-mountd-usage-error.patch
|
|
64c563 |
commit 6ec0d58fbff7c1a814a21cf8c7fe0ef5106a04c1
|
|
|
64c563 |
Author: Steve Dickson <steved@redhat.com>
|
|
|
64c563 |
Date: Wed Jan 20 14:16:08 2016 -0500
|
|
|
64c563 |
|
|
|
64c563 |
mountd: print an error message when no versions are specified
|
|
|
64c563 |
|
|
|
64c563 |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
64c563 |
|
|
|
64c563 |
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
|
|
|
64c563 |
index 8aca181..b584afc 100644
|
|
|
64c563 |
--- a/utils/mountd/mountd.c
|
|
|
64c563 |
+++ b/utils/mountd/mountd.c
|
|
|
64c563 |
@@ -794,9 +794,10 @@ main(int argc, char **argv)
|
|
|
64c563 |
}
|
|
|
64c563 |
|
|
|
64c563 |
/* No more arguments allowed. */
|
|
|
64c563 |
- if (optind != argc || !version_any())
|
|
|
64c563 |
+ if (optind != argc || !version_any()) {
|
|
|
64c563 |
+ fprintf(stderr, "%s: No protocol versions specified!\n", progname);
|
|
|
64c563 |
usage(progname, 1);
|
|
|
64c563 |
-
|
|
|
64c563 |
+ }
|
|
|
64c563 |
if (chdir(state_dir)) {
|
|
|
64c563 |
fprintf(stderr, "%s: chdir(%s) failed: %s\n",
|
|
|
64c563 |
progname, state_dir, strerror(errno));
|