summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/cdrom.c2
-rw-r--r--mdk-stage1/directory.c4
-rw-r--r--mdk-stage1/stage1.h2
-rw-r--r--mdk-stage1/tools.c20
4 files changed, 6 insertions, 22 deletions
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c
index 2c360d0e6..cb28bb56a 100644
--- a/mdk-stage1/cdrom.c
+++ b/mdk-stage1/cdrom.c
@@ -75,7 +75,7 @@ static enum return_type do_with_device(char * dev_name, char * dev_model)
log_message("found a " DISTRIB_NAME " CDROM, good news!");
#ifndef MANDRAKE_MOVE
- if (IS_SPECIAL_STAGE2 || ramdisk_possible())
+ if (IS_RESCUE || ramdisk_possible())
load_ramdisk(); /* we don't care about return code, we'll do it live if we failed */
#endif
diff --git a/mdk-stage1/directory.c b/mdk-stage1/directory.c
index 97221bcfa..6a5bc96f9 100644
--- a/mdk-stage1/directory.c
+++ b/mdk-stage1/directory.c
@@ -79,7 +79,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me
strcpy(install_location, IMAGE_LOCATION);
- if (IS_SPECIAL_STAGE2 || ramdisk_possible())
+ if (IS_RESCUE || ramdisk_possible())
strcat(install_location, get_ramdisk_realname()); /* RAMDISK install */
else
strcat(install_location, LIVE_LOCATION); /* LIVE install */
@@ -143,7 +143,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me
add_to_env("METHOD", method_live);
}
#ifndef MANDRAKE_MOVE
- if (IS_SPECIAL_STAGE2 || ((loopdev || streq(method_live, "disk")) && ramdisk_possible())) {
+ if (IS_RESCUE || ((loopdev || streq(method_live, "disk")) && ramdisk_possible())) {
/* RAMDISK install */
if (access(IMAGE_LOCATION RAMDISK_LOCATION, R_OK)) {
stg1_error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
diff --git a/mdk-stage1/stage1.h b/mdk-stage1/stage1.h
index 2d1800914..1d6fb9413 100644
--- a/mdk-stage1/stage1.h
+++ b/mdk-stage1/stage1.h
@@ -35,7 +35,6 @@ extern char * interactive_fifo;
#define MODE_RESCUE (1 << 3)
#define MODE_AUTOMATIC (1 << 4)
#define MODE_DEBUGSTAGE1 (1 << 6)
-#define MODE_SPECIAL_STAGE2 (1 << 8)
#define MODE_RAMDISK (1 << 9)
#define MODE_CHANGEDISK (1 << 10)
#define MODE_UPDATEMODULES (1 << 11)
@@ -48,7 +47,6 @@ extern char * interactive_fifo;
#define IS_RESCUE (get_param(MODE_RESCUE))
#define IS_AUTOMATIC (get_param(MODE_AUTOMATIC))
#define IS_DEBUGSTAGE1 (get_param(MODE_DEBUGSTAGE1))
-#define IS_SPECIAL_STAGE2 (get_param(MODE_SPECIAL_STAGE2))
#define IS_RAMDISK (get_param(MODE_RAMDISK))
#define IS_CHANGEDISK (get_param(MODE_CHANGEDISK))
#define IS_UPDATEMODULES (get_param(MODE_UPDATEMODULES))
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index f0c0d7efc..182e64130 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -108,7 +108,6 @@ void process_cmdline(void)
if (!strcmp(name, "noauto")) set_param(MODE_NOAUTO);
if (!strcmp(name, "netauto")) set_param(MODE_NETAUTO);
if (!strcmp(name, "recovery")) set_param(MODE_RECOVERY);
- if (!strcmp(name, "special_stage2")) set_param(MODE_SPECIAL_STAGE2);
if (!strcmp(name, "debugstage1")) set_param(MODE_DEBUGSTAGE1);
if (!strcmp(name, "automatic")) {
set_param(MODE_AUTOMATIC);
@@ -182,10 +181,6 @@ void set_param_valued(char *param_name, char *param_value)
void set_param(int i)
{
stage1_mode |= i;
- if (i == MODE_RESCUE) {
- set_param_valued("special_stage2", "rescue");
- set_param(MODE_SPECIAL_STAGE2);
- }
}
void unset_param(int i)
@@ -368,19 +363,10 @@ enum return_type load_ramdisk_fd(int ramdisk_fd, int size)
char * get_ramdisk_realname(void)
{
char img_name[500];
- char * stg2_name = get_param_valued("special_stage2");
- char * begin_img = RAMDISK_LOCATION;
- char * end_img = "_stage2.bz2";
-
- if (!stg2_name)
- stg2_name = "mdkinst";
-
- if (IS_RESCUE)
- stg2_name = "rescue";
- strcpy(img_name, begin_img);
- strcat(img_name, stg2_name);
- strcat(img_name, end_img);
+ strcpy(img_name, RAMDISK_LOCATION);
+ strcat(img_name, IS_RESCUE ? "rescue" : "mdkinst");
+ strcat(img_name, "_stage2.bz2");
return strdup(img_name);
}