From 445548636f4d57aaa8e29912803e242f772959c7 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 17 Feb 2011 15:14:41 -0600 Subject: [PATCH] UKERNEL: Add uafs_setMountDir 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 Tested-by: Derrick Brashear --- src/afs/UKERNEL/afs_usrops.c | 4 +--- src/afs/UKERNEL/afs_usrops.h | 2 +- src/afs/UKERNEL/afsd_uafs.c | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 4d0e843..89135a0 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -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 diff --git a/src/afs/UKERNEL/afs_usrops.h b/src/afs/UKERNEL/afs_usrops.h index b468b89..15bcc24 100644 --- a/src/afs/UKERNEL/afs_usrops.h +++ b/src/afs/UKERNEL/afs_usrops.h @@ -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__ */ diff --git a/src/afs/UKERNEL/afsd_uafs.c b/src/afs/UKERNEL/afsd_uafs.c index afd193c..b1b0fd2 100644 --- a/src/afs/UKERNEL/afsd_uafs.c +++ b/src/afs/UKERNEL/afsd_uafs.c @@ -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 -- 1.9.4