Merge tag 'trace-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux/fpc-iii.git] / arch / mips / dec / prom / cmdline.c
blob3ed63280ae29f111a45ea81c3cbde21443ab42f7
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * cmdline.c: read the command line passed to us by the PROM.
5 * Copyright (C) 1998 Harald Koerfgen
6 * Copyright (C) 2002, 2004 Maciej W. Rozycki
7 */
8 #include <linux/init.h>
9 #include <linux/kernel.h>
10 #include <linux/string.h>
11 #include <linux/types.h>
13 #include <asm/bootinfo.h>
14 #include <asm/dec/prom.h>
16 #undef PROM_DEBUG
18 void __init prom_init_cmdline(s32 argc, s32 *argv, u32 magic)
20 char *arg;
21 int start_arg, i;
24 * collect args and prepare cmd_line
26 if (!prom_is_rex(magic))
27 start_arg = 1;
28 else
29 start_arg = 2;
30 for (i = start_arg; i < argc; i++) {
31 arg = (void *)(long)(argv[i]);
32 strcat(arcs_cmdline, arg);
33 if (i < (argc - 1))
34 strcat(arcs_cmdline, " ");
37 #ifdef PROM_DEBUG
38 printk("arcs_cmdline: %s\n", &(arcs_cmdline[0]));
39 #endif