NFS: Do some tidying of the parsing code
Do some tidying of the parsing code, including: (*) Returning 0/error rather than true/false. (*) Putting the nfs_fs_context pointer first in some arg lists. (*) Unwrap some lines that will now fit on one line. (*) Provide unioned sockaddr/sockaddr_storage fields to avoid casts. (*) nfs_parse_devname() can paste its return values directly into the nfs_fs_context struct as that's where the caller puts them. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
48be8a66cf
commit
e558100fda
@@ -82,11 +82,11 @@ struct nfs_client_initdata {
|
||||
* In-kernel mount arguments
|
||||
*/
|
||||
struct nfs_fs_context {
|
||||
int flags;
|
||||
unsigned int flags; /* NFS{,4}_MOUNT_* flags */
|
||||
unsigned int rsize, wsize;
|
||||
unsigned int timeo, retrans;
|
||||
unsigned int acregmin, acregmax,
|
||||
acdirmin, acdirmax;
|
||||
unsigned int acregmin, acregmax;
|
||||
unsigned int acdirmin, acdirmax;
|
||||
unsigned int namlen;
|
||||
unsigned int options;
|
||||
unsigned int bsize;
|
||||
@@ -102,7 +102,10 @@ struct nfs_fs_context {
|
||||
bool sloppy;
|
||||
|
||||
struct {
|
||||
struct sockaddr_storage address;
|
||||
union {
|
||||
struct sockaddr address;
|
||||
struct sockaddr_storage _address;
|
||||
};
|
||||
size_t addrlen;
|
||||
char *hostname;
|
||||
u32 version;
|
||||
@@ -111,7 +114,10 @@ struct nfs_fs_context {
|
||||
} mount_server;
|
||||
|
||||
struct {
|
||||
struct sockaddr_storage address;
|
||||
union {
|
||||
struct sockaddr address;
|
||||
struct sockaddr_storage _address;
|
||||
};
|
||||
size_t addrlen;
|
||||
char *hostname;
|
||||
char *export_path;
|
||||
|
Reference in New Issue
Block a user