diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-11-04 12:02:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-11-04 12:02:53 +0000 |
commit | 4e5c98b81e00478f560fed1ae4ac4de6b5cc272d (patch) | |
tree | 83dff8501055cac219ed58bba9534c62157b6581 /mdk-stage1 | |
parent | 27059c3b4e2877a58e853c8048cf9bc59cff3d88 (diff) | |
download | drakx-backup-do-not-use-4e5c98b81e00478f560fed1ae4ac4de6b5cc272d.tar drakx-backup-do-not-use-4e5c98b81e00478f560fed1ae4ac4de6b5cc272d.tar.gz drakx-backup-do-not-use-4e5c98b81e00478f560fed1ae4ac4de6b5cc272d.tar.bz2 drakx-backup-do-not-use-4e5c98b81e00478f560fed1ae4ac4de6b5cc272d.tar.xz drakx-backup-do-not-use-4e5c98b81e00478f560fed1ae4ac4de6b5cc272d.zip |
test_that_cd() is now image_has_stage2()
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/cdrom.c | 14 | ||||
-rw-r--r-- | mdk-stage1/tools.c | 9 | ||||
-rw-r--r-- | mdk-stage1/tools.h | 1 |
3 files changed, 12 insertions, 12 deletions
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c index c3cee97c8..c6f8455f7 100644 --- a/mdk-stage1/cdrom.c +++ b/mdk-stage1/cdrom.c @@ -49,21 +49,11 @@ static int mount_that_cd_device(char * dev_name) } -static int test_that_cd() -{ -#ifdef MANDRAKE_MOVE - return access(IMAGE_LOCATION "/live_tree.clp", R_OK); -#else - return access(IMAGE_LOCATION LIVE_LOCATION, R_OK); -#endif -} - - static enum return_type try_with_device(char * dev_name, char * dev_model); static enum return_type do_with_device(char * dev_name, char * dev_model) { - if (test_that_cd()) { + if (!image_has_stage2()) { enum return_type results; umount(IMAGE_LOCATION); results = ask_yes_no("That CDROM disc does not seem to be a " DISTRIB_NAME " Installation CDROM.\nRetry with another disc?"); @@ -123,7 +113,7 @@ int try_automatic(char ** medias, char ** medias_models) wait_message("Trying to access " DISTRIB_NAME " CDROM disc (drive %s)", *model); if (mount_that_cd_device(*ptr) != -1) { - if (!test_that_cd()) { + if (image_has_stage2()) { remove_wait_message(); return i; } diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c index 182e64130..a89edf613 100644 --- a/mdk-stage1/tools.c +++ b/mdk-stage1/tools.c @@ -222,6 +222,15 @@ int total_memory(void) } +int image_has_stage2() +{ +#ifdef MANDRAKE_MOVE + return access(IMAGE_LOCATION "/live_tree.clp", R_OK) == 0; +#else + return access(IMAGE_LOCATION LIVE_LOCATION, R_OK) == 0; +#endif +} + int ramdisk_possible(void) { if (total_memory() > (IS_RESCUE ? MEM_LIMIT_RESCUE : MEM_LIMIT_DRAKX)) diff --git a/mdk-stage1/tools.h b/mdk-stage1/tools.h index 61d8c2725..df2910a73 100644 --- a/mdk-stage1/tools.h +++ b/mdk-stage1/tools.h @@ -31,6 +31,7 @@ void unset_param(int i); int charstar_to_int(const char * s); off_t file_size(const char * path); int total_memory(void); +int image_has_stage2(); int ramdisk_possible(void); enum return_type copy_file(char * from, char * to, void (*callback_func)(int overall)); #ifndef MANDRAKE_MOVE |