fileserver: Fix NeverAttach support
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 8 Apr 2012 12:58:25 +0000 (13:58 +0100)
committerDerrick Brashear <shadow@dementix.org>
Mon, 9 Apr 2012 01:12:52 +0000 (18:12 -0700)
Commit 35becabed870d4bfe49abaa499d99a3ffb0a2d31 added support for
the /vicepXX/NeverAttach. However this code only appears to work on
Linux. It fails build testing on (at least) Mac OS X, FreeBSD, and AIX.
Modify the code so that the NeverAttach call uses the same variable to
locate the path of the partition as the AlwaysAttach call does.

Change-Id: Ic87e112f362ac6d23376fb0a263d021c29c0b06e
Reviewed-on: http://gerrit.openafs.org/7125
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/vol/partition.c

index 95bb8a8..1004146 100644 (file)
@@ -501,7 +501,7 @@ VAttachPartitions(void)
            continue;
 
        /* Skip this Partition? */
-       if (VIsNeverAttach(mntent->mnt_dir))
+       if (VIsNeverAttach(mnt.mnt_mountp))
            continue;
 
        /* If we're going to always attach this partition, do it later. */
@@ -651,7 +651,7 @@ VAttachPartitions(void)
 #endif
 
        /* Skip this Partition? */
-       if (VIsNeverAttach(mntent->mnt_dir))
+       if (VIsNeverAttach(part))
            continue;
 
        /* If we're going to always attach this partition, do it later. */
@@ -685,7 +685,7 @@ VAttachPartitions(void)
            continue;
 
        /* Skip this Partition? */
-       if (VIsNeverAttach(mntent->mnt_dir))
+       if (VIsNeverAttach(fsent->fs_file))
            continue;
 
        /* If we're going to always attach this partition, do it later. */