summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/config-stage1.h1
-rw-r--r--mdk-stage1/stage1.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h
index fea665858..1962bf6f3 100644
--- a/mdk-stage1/config-stage1.h
+++ b/mdk-stage1/config-stage1.h
@@ -32,6 +32,7 @@
#define STAGE2_LOCATION "/tmp/stage2"
#ifdef MANDRAKE_MOVE
+#define MEM_LIMIT_MOVE 120
#define DISTRIB_NAME "Mandrake Move"
#define IMAGE_LOCATION "/sysroot/image_raw"
#define IMAGE_LOCATION_REAL "/sysroot/image"
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index 618f393c7..8f92e7f98 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -588,6 +588,9 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
}
#ifdef MANDRAKE_MOVE
+ if (total_memory() < MEM_LIMIT_MOVE)
+ stg1_error_message(DISTRIB_NAME " typically needs more than %d Mbytes of memory (detected %d Mbytes). You may proceed, but the machine may crash or lock up for no apparent reason. Continue at your own risk. Alternatively, you may reboot your system now.",
+ MEM_LIMIT_MOVE, total_memory());
if (mandrake_move_pre() != RETURN_OK)
stg1_error_message("Fatal error when preparing Mandrake Move.");
#endif