diff options
author | Daniel Mack <zonque@gmail.com> | 2012-11-26 13:14:42 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-11-27 11:29:08 +0900 |
commit | 7cda3bf134bfdd64e6e8219516129efa70e1fdd4 (patch) | |
tree | a275145a3b8146ecd8c8267b7444375949a51cf6 | |
parent | 1dcda5535c22da1da569d3fee254b9af7a8f8ae1 (diff) |
fs2dt: fix basename string compares
basename is initialized as
basename = strrchr(pathname,'/') + 1;
and does hence not contain the leading slash character.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/fs2dt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c index b7eda8f..79258a1 100644 --- a/kexec/fs2dt.c +++ b/kexec/fs2dt.c @@ -525,7 +525,7 @@ static void putnode(void) putprops(dn, namelist, numlist); /* Add initrd entries to the second kernel */ - if (initrd_base && !strcmp(basename,"/chosen/")) { + if (initrd_base && !strcmp(basename,"chosen/")) { int len = 8; unsigned long long initrd_end; @@ -554,7 +554,7 @@ static void putnode(void) /* Add cmdline to the second kernel. Check to see if the new * cmdline has a root=. If not, use the old root= cmdline. */ - if (!strcmp(basename,"/chosen/")) { + if (!strcmp(basename,"chosen/")) { size_t cmd_len = 0; char *param = NULL; char filename[MAXPATH]; |