Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / afs / UKERNEL / afsd_uafs.c
CommitLineData
805e021f
CE
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
26extern int call_syscall(long, long, long, long, long, long);
27
28void
29afsd_mount_afs(const char *rn, const char *mountdir)
30{
31 uafs_setMountDir(mountdir);
32 uafs_mount();
33}
34
35void
36afsd_set_rx_rtpri(void)
37{
38 /* noop */
39}
40void
41afsd_set_afsd_rtpri(void)
42{
43 /* noop */
44}
45
46int
47afsd_check_mount(const char *rn, const char *mountdir)
48{
49 /* libuafs could provide a callback of some kind to let the user code
50 * specify a "is this mount point valid?" function, but for now there's
51 * no need for it. */
52 return 0;
53}
54
55int
56afsd_call_syscall(struct afsd_syscall_args *args)
57{
58 return call_syscall(AFSCALL_CALL, args->syscall, args->params[0],
59 args->params[1], args->params[2], args->params[3]);
60}
61
62int
63afsd_fork(int wait, afsd_callback_func cbf, void *rock)
64{
65 int code;
66 usr_thread_t tid;
67 usr_thread_create(&tid, cbf, rock);
68 if (wait) {
69 code = usr_thread_join(tid, NULL);
70 } else {
71 code = usr_thread_detach(tid);
72 }
73 return code;
74}
75
76int
77afsd_daemon(int nochdir, int noclose)
78{
79 /* noop */
80 return 0;
81}
82
83#endif /* UKERNEL */