PageRenderTime 19ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/mips/dec/prom/cmdline.c

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
C | 39 lines | 25 code | 5 blank | 9 comment | 3 complexity | e67b5c3834f3ccb09fa5d56fa97a7231 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1/*
 2 * cmdline.c: read the command line passed to us by the PROM.
 3 *
 4 * Copyright (C) 1998 Harald Koerfgen
 5 * Copyright (C) 2002, 2004  Maciej W. Rozycki
 6 */
 7#include <linux/init.h>
 8#include <linux/kernel.h>
 9#include <linux/string.h>
10#include <linux/types.h>
11
12#include <asm/bootinfo.h>
13#include <asm/dec/prom.h>
14
15#undef PROM_DEBUG
16
17void __init prom_init_cmdline(s32 argc, s32 *argv, u32 magic)
18{
19	char *arg;
20	int start_arg, i;
21
22	/*
23	 * collect args and prepare cmd_line
24	 */
25	if (!prom_is_rex(magic))
26		start_arg = 1;
27	else
28		start_arg = 2;
29	for (i = start_arg; i < argc; i++) {
30		arg = (void *)(long)(argv[i]);
31		strcat(arcs_cmdline, arg);
32		if (i < (argc - 1))
33			strcat(arcs_cmdline, " ");
34	}
35
36#ifdef PROM_DEBUG
37	printk("arcs_cmdline: %s\n", &(arcs_cmdline[0]));
38#endif
39}