From 4bce0bcdcf2513a399cecbfe5e7ae295af61af4e Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 8 Oct 1999 13:40:13 +0000 Subject: 1999-10-08 Thomas Bushnell, BSG * bootstrap.c: (DEFAULT_ROOT): Remove macro. (main): If no root device was specified, then prompt as if the user had specified -a. Don't use strcpy to move NEW_ROOT into ROOT_NAME; that's unsafe. --- serverboot/bootstrap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'serverboot/bootstrap.c') diff --git a/serverboot/bootstrap.c b/serverboot/bootstrap.c index 69e4f892..f6d6050a 100644 --- a/serverboot/bootstrap.c +++ b/serverboot/bootstrap.c @@ -237,14 +237,14 @@ main(argc, argv) * root device was specificed, ask for the root device. */ - if (root_name [0] == '\0' || index(flag_string, 'a')) { + if (!root_name || root_name [0] == '\0' || index(flag_string, 'a')) { static char new_root[16]; - + printf("root device? [%s] ", root_name); safe_gets(new_root, sizeof(new_root)); if (new_root[0] != '\0') - strcpy (root_name, new_root); + root_name = new_root; } (void) strbuild(boot_script_name, -- cgit v1.2.3