diff options
author | hjl <hjl> | 2002-10-11 15:37:10 +0000 |
---|---|---|
committer | hjl <hjl> | 2002-10-11 15:37:10 +0000 |
commit | 0036a143c415eac6388d992a4e637e7004147296 (patch) | |
tree | a35845f909b4faebad58e783f12a6b3495aa7ea8 /utils/exportfs/exportfs.c | |
parent | 955d48dbcf0c75f263f2573c998acc65f95ededa (diff) | |
download | nfs-utils-0036a143c415eac6388d992a4e637e7004147296.tar.gz nfs-utils-0036a143c415eac6388d992a4e637e7004147296.tar.xz nfs-utils-0036a143c415eac6388d992a4e637e7004147296.zip |
2002-10-11 H.J. Lu <hjl@lucon.org>
* support/include/exportfs.h (export_errno): New.
* support/nfs/exports.c: Include <errno.h>.
(export_errno): New.
(getexportent): Set export_errno to EINVAL for bad option.
(parseopts): Likewise.
Report the location of the default sync/async option.
* utils/exportfs/exportfs.c (main): Initialize export_errno to
0. Return export_errno.
Diffstat (limited to 'utils/exportfs/exportfs.c')
-rw-r--r-- | utils/exportfs/exportfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 41f4750..60f130e 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -45,6 +45,8 @@ main(int argc, char **argv) xlog_open("exportfs"); + export_errno = 0; + while ((c = getopt(argc, argv, "aio:ruv")) != EOF) { switch(c) { case 'a': @@ -119,7 +121,7 @@ main(int argc, char **argv) xtab_export_write(); xtab_mount_write(); - return 0; + return export_errno; } /* we synchronise intention with reality. |