summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/stage1.c3
-rw-r--r--mdk-stage1/stage1.h2
-rw-r--r--mdk-stage1/tools.c1
3 files changed, 6 insertions, 0 deletions
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index f756bf052..739e3dfaa 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -536,6 +536,9 @@ int mandrake_move_post(void)
return RETURN_ERROR;
}
+ if (IS_DEBUGSTAGE1)
+ while (1);
+
log_message("move: pivot_rooting");
// trick so that kernel won't try to mount the root device when initrd exits
if (scall((fd = open("/proc/sys/kernel/real-root-dev", O_WRONLY)) < 0, "open"))
diff --git a/mdk-stage1/stage1.h b/mdk-stage1/stage1.h
index 0b47b7b93..84d760cd9 100644
--- a/mdk-stage1/stage1.h
+++ b/mdk-stage1/stage1.h
@@ -37,6 +37,7 @@ extern char * stage2_kickstart;
#define MODE_RESCUE (1 << 3)
#define MODE_AUTOMATIC (1 << 4)
#define MODE_LIVE (1 << 5)
+#define MODE_DEBUGSTAGE1 (1 << 6)
#define MODE_SPECIAL_STAGE2 (1 << 8)
#define MODE_RAMDISK (1 << 9)
#define MODE_CHANGEDISK (1 << 10)
@@ -50,6 +51,7 @@ extern char * stage2_kickstart;
#define IS_RESCUE (get_param(MODE_RESCUE))
#define IS_AUTOMATIC (get_param(MODE_AUTOMATIC))
#define IS_LIVE (get_param(MODE_LIVE))
+#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))
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index 58c9203df..7a2c0480f 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -95,6 +95,7 @@ void process_cmdline(void)
if (!strcmp(name, "recovery")) set_param(MODE_RECOVERY);
if (!strcmp(name, "special_stage2")) set_param(MODE_SPECIAL_STAGE2);
if (!strcmp(name, "live")) set_param(MODE_LIVE);
+ if (!strcmp(name, "debugstage1")) set_param(MODE_DEBUGSTAGE1);
if (!strcmp(name, "automatic")) {
set_param(MODE_AUTOMATIC);
grab_automatic_params(value);