Commit e7f81aa3 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: Change names of legacy interfaces in nfsd filesys to start with period

The nfsd filesystem provides an interface to nfsd.
Most of the current files should be considered legacy
interfaces as they are not particularly suitable for
filesystem interaction, but are required to support the
syscall interface.
This patch puts a '.' in front of all the names so they
appear as hidden names when the directory is listed.
parent 71713ecd
......@@ -54,16 +54,13 @@ static struct file *do_open(char *name, int flags)
static struct {
char *name; int wsize; int rsize;
} map[] = {
[NFSCTL_SVC]={"svc", sizeof(struct nfsctl_svc)},
[NFSCTL_ADDCLIENT]={"add", sizeof(struct nfsctl_client)},
[NFSCTL_DELCLIENT]={"del", sizeof(struct nfsctl_client)},
[NFSCTL_EXPORT]={"export", sizeof(struct nfsctl_export)},
[NFSCTL_UNEXPORT]={"unexport", sizeof(struct nfsctl_export)},
#ifdef notyet
[NFSCTL_UGIDUPDATE]={"ugid", sizeof(struct nfsctl_uidmap)},
#endif
[NFSCTL_GETFD]={"getfd", sizeof(struct nfsctl_fdparm), NFS_FHSIZE},
[NFSCTL_GETFS]={"getfs", sizeof(struct nfsctl_fsparm), sizeof(struct knfsd_fh)},
[NFSCTL_SVC]={".svc", sizeof(struct nfsctl_svc)},
[NFSCTL_ADDCLIENT]={".add", sizeof(struct nfsctl_client)},
[NFSCTL_DELCLIENT]={".del", sizeof(struct nfsctl_client)},
[NFSCTL_EXPORT]={".export", sizeof(struct nfsctl_export)},
[NFSCTL_UNEXPORT]={".unexport", sizeof(struct nfsctl_export)},
[NFSCTL_GETFD]={".getfd", sizeof(struct nfsctl_fdparm), NFS_FHSIZE},
[NFSCTL_GETFS]={".getfs", sizeof(struct nfsctl_fsparm), sizeof(struct knfsd_fh)},
};
long
......
......@@ -201,13 +201,13 @@ static struct file_operations exports_operations = {
* Description of fs contents.
*/
static struct { char *name; struct file_operations *ops; int mode; } files[] = {
[NFSD_Svc] = {"svc", &transaction_ops, S_IWUSR},
[NFSD_Add] = {"add", &transaction_ops, S_IWUSR},
[NFSD_Del] = {"del", &transaction_ops, S_IWUSR},
[NFSD_Export] = {"export", &transaction_ops, S_IWUSR},
[NFSD_Unexport] = {"unexport", &transaction_ops, S_IWUSR},
[NFSD_Getfd] = {"getfd", &transaction_ops, S_IWUSR|S_IRUSR},
[NFSD_Getfs] = {"getfs", &transaction_ops, S_IWUSR|S_IRUSR},
[NFSD_Svc] = {".svc", &transaction_ops, S_IWUSR},
[NFSD_Add] = {".add", &transaction_ops, S_IWUSR},
[NFSD_Del] = {".del", &transaction_ops, S_IWUSR},
[NFSD_Export] = {".export", &transaction_ops, S_IWUSR},
[NFSD_Unexport] = {".unexport", &transaction_ops, S_IWUSR},
[NFSD_Getfd] = {".getfd", &transaction_ops, S_IWUSR|S_IRUSR},
[NFSD_Getfs] = {".getfs", &transaction_ops, S_IWUSR|S_IRUSR},
[NFSD_List] = {"exports", &exports_operations, S_IRUGO},
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment