* amd/nfs_subr.c: use [1] for out-of-band pointer at the end of
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 16 May 2005 18:08:53 +0000 (18:08 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 16 May 2005 18:08:53 +0000 (18:08 +0000)
struct am_fh, because it's the most portable method.  Bug fix
suggestion from Dan Riley <dsr at mail.lns.cornell.edu>.

* amd/amfs_generic.c (amfs_lookup_mntfs): reset currently used
def_opts to options given in -opts, appended with the /default
options.  Bug fix suggestion from Dan Riley <dsr at
mail.lns.cornell.edu>.

ChangeLog
amd/amfs_generic.c
amd/nfs_subr.c

index ce0c0af1e0bd9f144a0339be27696675496217bc..714b1b072320125d80f359815a68d2844544fb98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-05-16  Erez Zadok  <ezk@cs.sunysb.edu>
+
+       * amd/nfs_subr.c: use [1] for out-of-band pointer at the end of
+       struct am_fh, because it's the most portable method.  Bug fix
+       suggestion from Dan Riley <dsr at mail.lns.cornell.edu>.
+
+       * amd/amfs_generic.c (amfs_lookup_mntfs): reset currently used
+       def_opts to options given in -opts, appended with the /default
+       options.  Bug fix suggestion from Dan Riley <dsr at
+       mail.lns.cornell.edu>.
+
 2005-05-13  Erez Zadok  <ezk@cs.sunysb.edu>
 
        *******************************************************************
index 12b2749fad1afb32287a526847c5fb222ff3062c..3d37194ded64e7c56c0f0df07e2b53c046be478c 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: amfs_generic.c,v 1.29 2005/05/09 03:10:16 ezk Exp $
+ * $Id: amfs_generic.c,v 1.30 2005/05/16 18:08:53 ezk Exp $
  *
  */
 
@@ -428,14 +428,18 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return)
     mntfs *new_mf;
 
     if (**cur_ivec == '-') {
+      XFREE(def_opts);
       if ((*cur_ivec)[1] == '\0') {
        /*
         * If we have a single dash '-' than we need to reset the
         * default options.
         */
-       XFREE(def_opts);
        def_opts = strdup(orig_def_opts);
        dlog("Resetting the default options, a single dash '-' was found.");
+      } else {
+       /* append options to /default options */
+       def_opts = str3cat((char *) 0, orig_def_opts, ";", *cur_ivec + 1);
+       dlog("Resetting def_opts to \"%s\"", def_opts);
       }
       continue;
     }
index 6bdb13fb957d074aa3ee5405e390150488dd0a41..84a9a50fde42464ca9503fdb9bc4358c8c39be07 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: nfs_subr.c,v 1.29 2005/05/01 18:06:18 ib42 Exp $
+ * $Id: nfs_subr.c,v 1.30 2005/05/16 18:08:53 ezk Exp $
  *
  */
 
@@ -74,7 +74,10 @@ struct am_fh {
       int fhh_pid;                             /* process id */
       int fhh_id;                              /* map id */
     } s;
-    char fhh_path[0];                          /* path to am_node */
+    /*
+     * path to am_node.  Use [1] because it's the most portable method.
+     */
+    char fhh_path[1];
   } u;
 };