diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2014-12-12 19:29:45 -0600 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2015-08-08 17:28:53 -0500 |
commit | 7b64e7b0f5b5c973a8bfa7a8f6f6c52cb7b730dd (patch) | |
tree | 08d49de26589f6c0f3bc18421dae1174b810ef70 | |
parent | 3a0ff12fa2eedfb3fe8e0ad185ee423df75c3316 (diff) |
nfsroot - cleanup trailing options on boot command line
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
-rw-r--r-- | fs/nfs/nfsroot.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 9bc9f04fb7f6..82937437e524 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c @@ -198,11 +198,17 @@ static int __init root_nfs_parse_options(char *incoming, char *exppath, /* * @incoming now points to the rest of the string; if it * contains something, append it to our root options buffer + * (but first make sure to delete any extraneous trailing + * options passed in on the boot command line) */ - if (incoming != NULL && *incoming != '\0') + if (incoming != NULL && *incoming != '\0') { + p = strpbrk(incoming, " "); + if ( p != NULL ) + *p = '\0'; if (root_nfs_cat(nfs_root_options, incoming, sizeof(nfs_root_options))) return -1; + } return 0; } |