summaryrefslogtreecommitdiff
path: root/kexec/kexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r--kexec/kexec.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index a1cec86..f4c22a6 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -994,6 +994,22 @@ void check_reuse_initrd(void)
free(line);
}
+const char *concat_cmdline(const char *base, const char *append)
+{
+ const char *cmdline;
+ if (!base && !append)
+ return NULL;
+ if (!base)
+ return append;
+ if (!append)
+ return base;
+ cmdline = xmalloc(strlen(base) + 1 + strlen(append) + 1);
+ strcpy(cmdline, base);
+ strcat(cmdline, " ");
+ strcat(cmdline, append);
+ return cmdline;
+}
+
int main(int argc, char *argv[])
{