summaryrefslogtreecommitdiffstats
path: root/utils/exportfs/exportfs.c
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2016-05-02 10:53:01 -0400
committerSteve Dickson <steved@redhat.com>2016-05-02 10:53:01 -0400
commitc304a49c7a4afe146848b6f98795880e70f3bbf8 (patch)
tree90047660338f89207148e3429c1e6d2c2f6f4416 /utils/exportfs/exportfs.c
parent91da135f243d6f87fcea8b8a3ce28a589917b0e4 (diff)
downloadnfs-utils-c304a49c7a4afe146848b6f98795880e70f3bbf8.tar.gz
nfs-utils-c304a49c7a4afe146848b6f98795880e70f3bbf8.tar.xz
nfs-utils-c304a49c7a4afe146848b6f98795880e70f3bbf8.zip
exportfs: add the debug option
Since calling xlog(D_GENERAL) will cause exportfs to exit with a status of 1, there really should be a way to see those messages for debugging purposes. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/exportfs/exportfs.c')
-rw-r--r--utils/exportfs/exportfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index a9151ff..5db348b 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -108,11 +108,14 @@ main(int argc, char **argv)
xlog_stderr(1);
xlog_syslog(0);
- while ((c = getopt(argc, argv, "afhio:ruvs")) != EOF) {
+ while ((c = getopt(argc, argv, "ad:fhio:ruvs")) != EOF) {
switch(c) {
case 'a':
f_all = 1;
break;
+ case 'd':
+ xlog_sconfig(optarg, 1);
+ break;
case 'f':
force_flush = 1;
break;
@@ -878,6 +881,6 @@ error(nfs_export *exp, int err)
static void
usage(const char *progname, int n)
{
- fprintf(stderr, "usage: %s [-afhioruvs] [host:/path]\n", progname);
+ fprintf(stderr, "usage: %s [-adfhioruvs] [host:/path]\n", progname);
exit(n);
}