]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
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>
Sun, 27 Feb 2011 16:07:55 +0000 (08:07 -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.

Reviewed-on: http://gerrit.openafs.org/3978
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 445548636f4d57aaa8e29912803e242f772959c7)

Change-Id: I86607ac80f564950b544a9283794f842d0dadadb
Reviewed-on: http://gerrit.openafs.org/4085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-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 4d0e84389dc0bcb43be25f6c541d7cebf29ac649..89135a08c9abf8c920e451c15de166b4c754b018 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 b468b89767bd20352f9d28ada02a2a037eacd0b2..15bcc24f6d8192317c123c2751ebfa9612d6f6dd 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 336a3d9bfeceadf25d4a32ab9a05890061b5d2b2..97994a8023a8af97553d173497c45c07bcc4cede 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