]> git.decadent.org.uk Git - nfs-utils.git/blob - support/nfs/nfsclient.c
text-based mount.nfs: Use "child" instead of "bg" for nfsmount_s
[nfs-utils.git] / support / nfs / nfsclient.c
1 /*
2  * support/nfs/client.c
3  *
4  * Add or delete an NFS client in knfsd.
5  *
6  * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
7  */
8
9 #ifdef HAVE_CONFIG_H
10 #include <config.h>
11 #endif
12
13 #include <string.h>
14 #include "nfslib.h"
15
16 int
17 nfsaddclient(struct nfsctl_client *clp)
18 {
19         struct nfsctl_arg       arg;
20
21         arg.ca_version = NFSCTL_VERSION;
22         memcpy(&arg.ca_client, clp, sizeof(arg.ca_client));
23         return nfsctl(NFSCTL_ADDCLIENT, &arg, NULL);
24 }
25
26 int
27 nfsdelclient(struct nfsctl_client *clp)
28 {
29         struct nfsctl_arg       arg;
30
31         arg.ca_version = NFSCTL_VERSION;
32         memcpy(&arg.ca_client, clp, sizeof(arg.ca_client));
33         return nfsctl(NFSCTL_DELCLIENT, &arg, NULL);
34 }