From 7e51f93bebf1015500cb0786254963aa2a3d21ce Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 4 Nov 2003 17:59:25 +0000 Subject: hack up a warning message when we're in low mem. chosen 120 mbytes, need to be refined later. --- mdk-stage1/config-stage1.h | 1 + mdk-stage1/stage1.c | 3 +++ 2 files changed, 4 insertions(+) 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 -- cgit v1.2.1