void __init
chrp_setup_arch(void)
{
- extern char cmd_line[];
struct device_node *root;
unsigned int *opprop;
{
struct device_node *phb;
struct eeh_early_enable_info info;
-
- extern char cmd_line[]; /* Very early cmd line parse. Cheap, but works. */
- char *eeh_force_off = strstr(cmd_line, "eeh-force-off");
- char *eeh_force_on = strstr(cmd_line, "eeh-force-on");
+ char *eeh_force_off = strstr(saved_command_line, "eeh-force-off");
+ char *eeh_force_on = strstr(saved_command_line, "eeh-force-on");
ibm_set_eeh_option = rtas_token("ibm,set-eeh-option");
ibm_set_slot_reset = rtas_token("ibm,set-slot-reset");
*/
.globl cmd_line
cmd_line:
- .space 512
+ .space 512 /* COMMAND_LINE_SIZE */
#include "pmac.h"
-extern char saved_command_line[];
static int current_root_goodness = -1;
#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
#include <asm/ppcdebug.h>
#include <asm/btext.h>
#include <asm/sections.h>
+#include <asm/machdep.h>
#include "open_pic.h"
#ifdef CONFIG_LOGO_LINUX_CLUT224
extern void copy_and_flush(unsigned long dest, unsigned long src,
unsigned long size, unsigned long offset);
-extern char cmd_line[512]; /* XXX */
unsigned long dev_tree_size;
unsigned long _get_PIR(void);
call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
RELOC("bootargs"), p, sizeof(cmd_line));
if (p != NULL && p[0] != 0)
- strncpy(RELOC(cmd_line), p, sizeof(cmd_line));
+ strlcpy(RELOC(cmd_line), p, sizeof(cmd_line));
}
- RELOC(cmd_line[sizeof(cmd_line) - 1]) = 0;
-
mem = prom_initialize_lmb(mem);
char *name;
/* The user has requested a console so this is already set up. */
- if (strstr(cmd_line, "console="))
+ if (strstr(saved_command_line, "console="))
return -EBUSY;
prom_stdout = find_path_device(of_stdout_device);
extern struct machdep_calls ppc_md;
#define COMMAND_LINE_SIZE 512
extern char cmd_line[COMMAND_LINE_SIZE];
+extern char saved_command_line[COMMAND_LINE_SIZE];
/* Functions to produce codes on the leds.
* The SRC code should be unique for the message category and should