Commit f60f250f authored by Neil Brown's avatar Neil Brown Committed by James Bottomley

[PATCH] Convert fs/nfsctl.c to use C99 named initiailzers

From Art Haas <ahaas@airmail.net>:

This converts the file to use C99 named initializers.  These change make
the file compile with fewer warnings if '-W' is added to the compile
flags, and may enhance code readability.  Let me know if you think this
should be sent to Linus.
parent 833221da
...@@ -54,13 +54,36 @@ static struct file *do_open(char *name, int flags) ...@@ -54,13 +54,36 @@ static struct file *do_open(char *name, int flags)
static struct { static struct {
char *name; int wsize; int rsize; char *name; int wsize; int rsize;
} map[] = { } map[] = {
[NFSCTL_SVC]={".svc", sizeof(struct nfsctl_svc)}, [NFSCTL_SVC] = {
[NFSCTL_ADDCLIENT]={".add", sizeof(struct nfsctl_client)}, .name = ".svc",
[NFSCTL_DELCLIENT]={".del", sizeof(struct nfsctl_client)}, .wsize = sizeof(struct nfsctl_svc)
[NFSCTL_EXPORT]={".export", sizeof(struct nfsctl_export)}, },
[NFSCTL_UNEXPORT]={".unexport", sizeof(struct nfsctl_export)}, [NFSCTL_ADDCLIENT] = {
[NFSCTL_GETFD]={".getfd", sizeof(struct nfsctl_fdparm), NFS_FHSIZE}, .name = ".add",
[NFSCTL_GETFS]={".getfs", sizeof(struct nfsctl_fsparm), sizeof(struct knfsd_fh)}, .wsize = sizeof(struct nfsctl_client)
},
[NFSCTL_DELCLIENT] = {
.name = ".del",
.wsize = sizeof(struct nfsctl_client)
},
[NFSCTL_EXPORT] = {
.name = ".export",
.wsize = sizeof(struct nfsctl_export)
},
[NFSCTL_UNEXPORT] = {
.name = ".unexport",
.wsize = sizeof(struct nfsctl_export)
},
[NFSCTL_GETFD] = {
.name = ".getfd",
.wsize = sizeof(struct nfsctl_fdparm),
.rsize = NFS_FHSIZE
},
[NFSCTL_GETFS] = {
.name = ".getfs",
.wsize = sizeof(struct nfsctl_fsparm),
.rsize = sizeof(struct knfsd_fh)
},
}; };
long long
......
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