X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fexportfs%2Fexportfs.c;h=60f130e6f802bf1781a87d6bddfa99c0b3d05b41;hp=4c04098e1579475a5f66b5314872db308c599f41;hb=0036a143c415eac6388d992a4e637e7004147296;hpb=37e49789ab1cd849def25ba4c4d97ccdb11d1e61 diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 4c04098..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. @@ -206,6 +208,7 @@ exportfs(char *arg, char *options, int verbose) } else hp = hp2; exp = export_find(hp, path); + hname = hp->h_name; } else { exp = export_lookup(hname, path, 0); } @@ -344,6 +347,8 @@ dump(int verbose) c = dumpopt(c, "no_subtree_check"); if (ep->e_flags & NFSEXP_NOAUTHNLM) c = dumpopt(c, "insecure_locks"); + if (ep->e_flags & NFSEXP_FSID) + c = dumpopt(c, "fsid=%d", ep->e_fsid); if (ep->e_maptype == CLE_MAP_UGIDD) c = dumpopt(c, "mapping=ugidd"); else if (ep->e_maptype == CLE_MAP_FILE)