summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/disk.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-05-17 16:53:32 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-05-17 16:53:32 +0000
commit067ea25e278d221724425e492452d4341ab2e669 (patch)
tree6abef88f0bf831cd6316cc5adbb550d337c7275a /mdk-stage1/disk.c
parent93796296016933af1c23f13fc2ae6d5f62299527 (diff)
downloaddrakx-backup-do-not-use-067ea25e278d221724425e492452d4341ab2e669.tar
drakx-backup-do-not-use-067ea25e278d221724425e492452d4341ab2e669.tar.gz
drakx-backup-do-not-use-067ea25e278d221724425e492452d4341ab2e669.tar.bz2
drakx-backup-do-not-use-067ea25e278d221724425e492452d4341ab2e669.tar.xz
drakx-backup-do-not-use-067ea25e278d221724425e492452d4341ab2e669.zip
don't write nonsense code to separate frontend from stage1,
but rather, try to do some clever things
Diffstat (limited to 'mdk-stage1/disk.c')
-rw-r--r--mdk-stage1/disk.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c
index 23f865380..9b47ce466 100644
--- a/mdk-stage1/disk.c
+++ b/mdk-stage1/disk.c
@@ -76,7 +76,7 @@ static enum return_type try_with_device(char *dev_name)
if (!(f = fopen("/proc/partitions", "rb")) || !fgets(buf, sizeof(buf), f) || !fgets(buf, sizeof(buf), f)) {
log_perror(dev_name);
- error_message("Could not read partitions information.");
+ stg1_error_message("Could not read partitions information.");
return RETURN_ERROR;
}
@@ -94,7 +94,7 @@ static enum return_type try_with_device(char *dev_name)
fclose(f);
if (parts[0] == NULL) {
- error_message("No partitions found.");
+ stg1_error_message("No partitions found.");
return RETURN_ERROR;
}
@@ -109,7 +109,7 @@ static enum return_type try_with_device(char *dev_name)
if (my_mount(device_fullname, disk_own_mount, "ext2") == -1 &&
my_mount(device_fullname, disk_own_mount, "vfat") == -1 &&
my_mount(device_fullname, disk_own_mount, "reiserfs") == -1) {
- error_message("I can't find a valid filesystem (tried: ext2, vfat, reiserfs).");
+ stg1_error_message("I can't find a valid filesystem (tried: ext2, vfat, reiserfs).");
return try_with_device(dev_name);
}
@@ -124,7 +124,7 @@ static enum return_type try_with_device(char *dev_name)
strcat(location_full, answers_location[0]);
if (access(location_full, R_OK)) {
- error_message("Directory or ISO image file could not be found on partition.\n"
+ stg1_error_message("Directory or ISO image file could not be found on partition.\n"
"Here's a short extract of the files in the root of the partition:\n"
"%s", disk_extract_list_directory(disk_own_mount));
umount(disk_own_mount);
@@ -136,7 +136,7 @@ static enum return_type try_with_device(char *dev_name)
if (!stat(location_full, &statbuf) && !S_ISDIR(statbuf.st_mode)) {
log_message("%s exists and is not a directory, assuming this is an ISO image", location_full);
if (lomount(location_full, IMAGE_LOCATION)) {
- error_message("Could not mount file %s as an ISO image of the " DISTRIB_NAME " Distribution.", answers_location[0]);
+ stg1_error_message("Could not mount file %s as an ISO image of the " DISTRIB_NAME " Distribution.", answers_location[0]);
umount(disk_own_mount);
return try_with_device(dev_name);
}
@@ -146,7 +146,7 @@ static enum return_type try_with_device(char *dev_name)
if (IS_SPECIAL_STAGE2 || ramdisk_possible()) {
/* RAMDISK install */
if (access(IMAGE_LOCATION RAMDISK_LOCATION, R_OK)) {
- error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
+ stg1_error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
"(I need the subdirectory " RAMDISK_LOCATION ")\n"
"Here's a short extract of the files in the directory:\n"
"%s", disk_extract_list_directory(IMAGE_LOCATION));
@@ -155,7 +155,7 @@ static enum return_type try_with_device(char *dev_name)
return try_with_device(dev_name);
}
if (load_ramdisk() != RETURN_OK) {
- error_message("Could not load program into memory.");
+ stg1_error_message("Could not load program into memory.");
loumount();
umount(disk_own_mount);
return try_with_device(dev_name);
@@ -164,7 +164,7 @@ static enum return_type try_with_device(char *dev_name)
/* LIVE install */
char p;
if (access(IMAGE_LOCATION LIVE_LOCATION, R_OK)) {
- error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
+ stg1_error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
"(I need the subdirectory " LIVE_LOCATION ")\n"
"Here's a short extract of the files in the directory:\n"
"%s", disk_extract_list_directory(IMAGE_LOCATION));
@@ -173,7 +173,7 @@ static enum return_type try_with_device(char *dev_name)
return try_with_device(dev_name);
}
if (readlink(IMAGE_LOCATION LIVE_LOCATION "/usr/bin/runinstall2", &p, 1) != 1) {
- error_message("The " DISTRIB_NAME " Distribution seems to be copied on a Windows partition. "
+ stg1_error_message("The " DISTRIB_NAME " Distribution seems to be copied on a Windows partition. "
"You need more memory to perform an installation from a Windows partition. "
"Another solution if to copy the " DISTRIB_NAME " Distribution on a Linux partition.");
loumount();
@@ -210,7 +210,7 @@ enum return_type disk_prepare(void)
}
if (count == 0) {
- error_message("No DISK drive found.");
+ stg1_error_message("No DISK drive found.");
i = ask_insmod(SCSI_ADAPTERS);
if (i == RETURN_BACK)
return RETURN_BACK;