kexec-tools/kexec-tools-1.101-ppc64-cliargs.patch
Jarod Wilson e4cc23de29 - ppc64 fixups:
- actually build ppc64 binaries (bug 203407)
- correct usage output
- avoid segfault in command-line parsing
- install kexec man page
- use regulation Fedora BuildRoot
2006-08-22 14:18:04 +00:00

22 lines
768 B
Diff

Index: kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools-1.101.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c
@@ -267,10 +267,12 @@ void putprops(char *fn, struct dirent **
char *old_param;
memcpy(temp_cmdline, dt, len);
param = strstr(temp_cmdline, "root=");
- old_param = strtok(param, " ");
- if (cmd_len != 0)
- strcat(local_cmdline, " ");
- strcat(local_cmdline, old_param);
+ if (param) {
+ old_param = strtok(param, " ");
+ if (cmd_len != 0)
+ strcat(local_cmdline, " ");
+ strcat(local_cmdline, old_param);
+ }
}
strcat(local_cmdline, " ");
cmd_len = strlen(local_cmdline);