libuafs: Allow -mountdir to override uafs_Setup
[openafs.git] / src / afs / UKERNEL / afsd_uafs.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * User space client glue for the afsd cache manager interface
12  */
13
14 #include <afsconfig.h>
15 #include <afs/param.h>
16
17 #ifdef UKERNEL
18
19 #include "afs/sysincludes.h"
20 #include "afsincludes.h"
21 #include "afs_usrops.h"
22 #include "afs/afsutil.h"
23 #include "afs/afs_args.h"
24 #include "afsd/afsd.h"
25
26 extern int call_syscall(long, long, long, long, long, long);
27
28 void
29 afsd_mount_afs(const char *rn, const char *mountdir)
30 {
31     uafs_mountWithDir(mountdir);
32 }
33
34 void
35 afsd_set_rx_rtpri(void)
36 {
37     /* noop */
38 }
39 void
40 afsd_set_afsd_rtpri(void)
41 {
42     /* noop */
43 }
44
45 int
46 afsd_call_syscall(long param1, long param2, long param3, long param4,
47                   long param5)
48 {
49     return call_syscall(AFSCALL_CALL, param1, param2, param3, param4, param5);
50 }
51
52 int
53 afsd_fork(int wait, afsd_callback_func cbf, void *rock)
54 {
55     int code;
56     usr_thread_t tid;
57     usr_thread_create(&tid, cbf, rock);
58     if (wait) {
59         code = usr_thread_join(tid, NULL);
60     } else {
61         code = usr_thread_detach(tid);
62     }
63     return code;
64 }
65
66 int
67 afsd_daemon(int nochdir, int noclose)
68 {
69     /* noop */
70     return 0;
71 }
72
73 #endif /* UKERNEL */