]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/exportfs/exportfs.c
Extend the exportfs interface to pass fslocations info into the kernel.
[nfs-utils.git] / utils / exportfs / exportfs.c
index fdf536978e5e8ede70a1501ba2b70d162d56529d..40a6b56bc9fa15ccfe611af7d39ea728400f4295 100644 (file)
@@ -8,7 +8,9 @@
  * Extensive changes, 1999, Neil Brown <neilb@cse.unsw.edu.au>
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <string.h>
@@ -398,8 +400,12 @@ 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_NOACL)
+                               c = dumpopt(c, "no_acl");
                        if (ep->e_flags & NFSEXP_FSID)
                                c = dumpopt(c, "fsid=%d", ep->e_fsid);
+                       if (ep->e_uuid)
+                               c = dumpopt(c, "fsid=%s", ep->e_uuid);
                        if (ep->e_mountpoint)
                                c = dumpopt(c, "mountpoint%s%s", 
                                            ep->e_mountpoint[0]?"=":"", 
@@ -408,11 +414,23 @@ dump(int verbose)
                                c = dumpopt(c, "mapping=ugidd");
                        else if (ep->e_maptype == CLE_MAP_FILE)
                                c = dumpopt(c, "mapping=file");
-                       if (ep->e_anonuid != -2)
+                       if (ep->e_anonuid != 65534)
                                c = dumpopt(c, "anonuid=%d", ep->e_anonuid);
-                       if (ep->e_anongid != -2)
+                       if (ep->e_anongid != 65534)
                                c = dumpopt(c, "anongid=%d", ep->e_anongid);
-
+                       switch(ep->e_fslocmethod) {
+                       case FSLOC_NONE:
+                               break;
+                       case FSLOC_REFER:
+                               c = dumpopt(c, "refer=%s", ep->e_fslocdata);
+                               break;
+                       case FSLOC_REPLICA:
+                               c = dumpopt(c, "replicas=%s", ep->e_fslocdata);
+                               break;
+                       case FSLOC_STUB:
+                               c = dumpopt(c, "fsloc=stub");
+                               break;
+                       }
                        printf("%c\n", (c != '(')? ')' : ' ');
                }
        }