UKERNEL: Add uafs_setMountDir
authorAndrew Deason <adeason@sinenomine.net>
Thu, 17 Feb 2011 21:14:41 +0000 (15:14 -0600)
committerDerrick Brashear <shadow@dementia.org>
Thu, 17 Feb 2011 22:01:45 +0000 (14:01 -0800)
Replace the function uafs_mountWithDir with uafs_setMountDir, and
adjust the one caller. This allows libuafs users to manually set the
mount dir after e.g. the mount dir is set from afsd options.

Change-Id: I85a967ce27a72f54c1ab29b007dbb8634017c897
Reviewed-on: http://gerrit.openafs.org/3978
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/UKERNEL/afs_usrops.c
src/afs/UKERNEL/afs_usrops.h
src/afs/UKERNEL/afsd_uafs.c

index 4d0e843..89135a0 100644 (file)
@@ -1294,7 +1294,7 @@ uafs_mount(void) {
 }
 
 void
-uafs_mountWithDir(const char *dir)
+uafs_setMountDir(const char *dir)
 {
     if (dir) {
        int rc;
@@ -1311,8 +1311,6 @@ uafs_mountWithDir(const char *dir)
            }
        }
     }
-
-    uafs_mount();
 }
 
 int
index b468b89..15bcc24 100644 (file)
@@ -149,7 +149,7 @@ extern int uafs_statmountpoint_r(char *path);
 extern int uafs_statvfs(struct statvfs *buf);
 extern void uafs_Shutdown(void);
 extern void uafs_mount(void);
-extern void uafs_mountWithDir(const char *dir);
+extern void uafs_setMountDir(const char *dir);
 extern int uafs_fork(int wait, void* (*cbf) (void *), void *rock);
 
 #endif /* __AFS_USROPS_H__ */
index afd193c..b1b0fd2 100644 (file)
@@ -28,7 +28,8 @@ extern int call_syscall(long, long, long, long, long, long);
 void
 afsd_mount_afs(const char *rn, const char *mountdir)
 {
-    uafs_mountWithDir(mountdir);
+    uafs_setMountDir(mountdir);
+    uafs_mount();
 }
 
 void