nfsservctl(2)
π nfsservctl π
okay bestie, gather round, because today we're talking about nfsservctl β the syscall interface to the kernel nfs daemon. yes she's a real one. no she does not exist anymore. we'll get there, don't spiral. π«Ά
This page lives in the System Calls Manual, section 2. iykyk.
β¨ NAME β¨
nfsservctl β syscall interface to kernel nfs daemon
π LIBRARY π
Standard C library (libc, -lc)
π SYNOPSIS π
#include <linux/nfsd/syscall.h>
long nfsservctl(int cmd, struct nfsctl_arg *argp,
union nfsctl_res *resp);
πΈ DESCRIPTION πΈ
Note: Since Linux 3.1, this system call no longer exists. It has been replaced by a set of files in thenfsdfilesystem; seenfsd(7).
ok so like. she's gone. she's been replaced by some files in the nfsd filesystem. that's the whole tea. but we still gotta document her bc history is history. π
here's the whole command situation, verbatim, no edits, don't @ me:
/*
* These are the commands understood by nfsctl().
*/
#define NFSCTL_SVC 0 /* This is a server process. */
#define NFSCTL_ADDCLIENT 1 /* Add an NFS client. */
#define NFSCTL_DELCLIENT 2 /* Remove an NFS client. */
#define NFSCTL_EXPORT 3 /* Export a filesystem. */
#define NFSCTL_UNEXPORT 4 /* Unexport a filesystem. */
#define NFSCTL_UGIDUPDATE 5 /* Update a client's UID/GID map
(only in Linux 2.4.x and earlier). */
#define NFSCTL_GETFH 6 /* Get a file handle (used by mountd(8))
(only in Linux 2.4.x and earlier). */
struct nfsctl_arg {
int ca_version; /* safeguard */
union {
struct nfsctl_svc u_svc;
struct nfsctl_client u_client;
struct nfsctl_export u_export;
struct nfsctl_uidmap u_umap;
struct nfsctl_fhparm u_getfh;
unsigned int u_debug;
} u;
}
union nfsctl_res {
struct knfs_fh cr_getfh;
unsigned int cr_debug;
};
like look at that u union. a whole buffet. she was doing the most in the best way. π
π₯ RETURN VALUE π₯
- Success? you get
0. iconic. we love a clean return. - Error? you get
-1, anderrnogets set to tell you what went wrong.
π STANDARDS π
Linux. (yes, just Linux. she's built different. π)
π HISTORY π
- Removed in Linux 3.1.
- Removed in glibc 2.28.
not one but TWO removals. she got double-deleted. it's giving legendary exit. ποΈ
π¦ SEE ALSO π¦
that's the whole page babes, every flag, every struct field, every version number, nothing skipped, periodt. π
this lil writeup comes from the Linux man-pages 6.20, dated 2025-09-21 β¨ β go drink some water and stay slaying bestie ππ¦
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms