summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-02 13:45:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-02 13:45:26 +0000
commita77fe688cd9c8c4efb8b9c363a7078e7a563f0bb (patch)
tree1f9a0093f869e3517b4e1aa1669ee62533811d30 /mdk-stage1
parent360de09d5fd6566f5e67b1ec785a6d938d07b5fb (diff)
downloaddrakx-a77fe688cd9c8c4efb8b9c363a7078e7a563f0bb.tar
drakx-a77fe688cd9c8c4efb8b9c363a7078e7a563f0bb.tar.gz
drakx-a77fe688cd9c8c4efb8b9c363a7078e7a563f0bb.tar.bz2
drakx-a77fe688cd9c8c4efb8b9c363a7078e7a563f0bb.tar.xz
drakx-a77fe688cd9c8c4efb8b9c363a7078e7a563f0bb.zip
compile less things when MANDRAKE_MOVE is defined
(needed so that future commits can restrict define's in config-stage1.h)
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/disk.c2
-rw-r--r--mdk-stage1/disk.h2
-rw-r--r--mdk-stage1/network.c6
-rw-r--r--mdk-stage1/network.h2
-rw-r--r--mdk-stage1/stage1.c10
-rw-r--r--mdk-stage1/tools.c2
-rw-r--r--mdk-stage1/tools.h4
7 files changed, 22 insertions, 6 deletions
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c
index 19081610a..b99fd2849 100644
--- a/mdk-stage1/disk.c
+++ b/mdk-stage1/disk.c
@@ -316,6 +316,7 @@ enum return_type disk_prepare(void)
return disk_prepare();
}
+#ifndef MANDRAKE_MOVE
int
process_recovery(void)
{
@@ -385,3 +386,4 @@ process_recovery(void)
return 0;
}
+#endif
diff --git a/mdk-stage1/disk.h b/mdk-stage1/disk.h
index 3be7d63c1..91cfbb2fd 100644
--- a/mdk-stage1/disk.h
+++ b/mdk-stage1/disk.h
@@ -23,6 +23,8 @@
#define _DISK_H_
enum return_type disk_prepare(void);
+#ifndef MANDRAKE_MOVE
int process_recovery(void);
+#endif
#endif
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index b8c77dccf..f17b7c438 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -619,7 +619,7 @@ static char * interface_select(void)
return choice;
}
-
+#ifndef MANDRAKE_MOVE
static enum return_type get_http_proxy(char **http_proxy_host, char **http_proxy_port)
{
char *questions[] = { "HTTP proxy host", "HTTP proxy port", NULL };
@@ -806,7 +806,7 @@ static int choose_mirror_from_list(char *http_proxy_host, char *http_proxy_port,
return results;
}
-
+#endif
/* -=-=-- */
@@ -889,6 +889,7 @@ enum return_type nfs_prepare(void)
}
+#ifndef MANDRAKE_MOVE
enum return_type ftp_prepare(void)
{
char * questions[] = { "FTP server", DISTRIB_NAME " directory", "Login", "Password", NULL };
@@ -1113,3 +1114,4 @@ enum return_type http_prepare(void)
return RETURN_OK;
}
+#endif
diff --git a/mdk-stage1/network.h b/mdk-stage1/network.h
index be7a73dfc..ccef5d623 100644
--- a/mdk-stage1/network.h
+++ b/mdk-stage1/network.h
@@ -28,8 +28,10 @@
enum return_type nfs_prepare(void);
+#ifndef MANDRAKE_MOVE
enum return_type ftp_prepare(void);
enum return_type http_prepare(void);
+#endif
enum boot_proto_type { BOOTPROTO_STATIC, BOOTPROTO_DHCP, BOOTPROTO_ADSL_PPPOE };
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index 57477d198..03cd10515 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -363,13 +363,15 @@ static void method_select_and_prepare(void)
#ifndef DISABLE_NETWORK
if (!strcmp(choice, network_nfs_install))
results = nfs_prepare();
-
+
+#ifndef MANDRAKE_MOVE
if (!strcmp(choice, network_ftp_install))
results = ftp_prepare();
if (!strcmp(choice, network_http_install))
results = http_prepare();
#endif
+#endif
if (results != RETURN_OK)
return method_select_and_prepare();
@@ -648,19 +650,21 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
if (total_memory() < MEM_LIMIT_MOVE)
stg1_info_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());
-#endif
-
+#else
#ifndef DISABLE_DISK
if (IS_RECOVERY && streq(get_auto_value("method"), "cdrom")) {
if (!process_recovery())
method_select_and_prepare();
} else
#endif
+#endif
method_select_and_prepare();
+#ifndef MANDRAKE_MOVE
if (!IS_RAMDISK)
if (symlink(IMAGE_LOCATION_REAL LIVE_LOCATION, STAGE2_LOCATION) != 0)
log_perror("symlink from " IMAGE_LOCATION_REAL LIVE_LOCATION " to " STAGE2_LOCATION " failed");
+#endif
if (interactive_pid != 0)
kill(interactive_pid, 9);
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index 6915cf15b..11aa0c446 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -286,6 +286,7 @@ enum return_type copy_file(char * from, char * to, void (*callback_func)(int ove
return ret;
}
+#ifndef MANDRAKE_MOVE
static void save_stuff_for_rescue(void)
{
copy_file("/etc/resolv.conf", STAGE2_LOCATION "/etc/resolv.conf", NULL);
@@ -409,6 +410,7 @@ enum return_type load_ramdisk(void)
else
return load_ramdisk_fd(st2_fd, size);
}
+#endif
/* pixel's */
void * memdup(void *src, size_t size)
diff --git a/mdk-stage1/tools.h b/mdk-stage1/tools.h
index ab98deb87..61d8c2725 100644
--- a/mdk-stage1/tools.h
+++ b/mdk-stage1/tools.h
@@ -32,10 +32,12 @@ int charstar_to_int(const char * s);
off_t file_size(const char * path);
int total_memory(void);
int ramdisk_possible(void);
-char * get_ramdisk_realname(void);
enum return_type copy_file(char * from, char * to, void (*callback_func)(int overall));
+#ifndef MANDRAKE_MOVE
+char * get_ramdisk_realname(void);
enum return_type load_ramdisk(void);
enum return_type load_ramdisk_fd(int ramdisk_fd, int size);
+#endif
void * memdup(void *src, size_t size);
void add_to_env(char * name, char * value);
char ** list_directory(char * direct);