- added ntfs support

- more env vars:
  + with disk, DEVICE holds partition name, i.e. hda2
  + PIGGYBACK set means install from iso image (disk & nfs)
- HTTP/1.0 from now
This commit is contained in:
Sergey Bolshakov 2005-03-02 17:48:28 +00:00
parent 44bc6e0be3
commit c5d9d80f43
4 changed files with 10 additions and 3 deletions

7
disk.c
View File

@ -207,8 +207,9 @@ static enum return_type try_with_device(char *dev_name)
if (my_mount(device_fullname, IMAGE_LOCATION, "ext2", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "vfat", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "ntfs", 0) == -1 &&
my_mount(device_fullname, IMAGE_LOCATION, "reiserfs", 0) == -1) {
stg1_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, ntfs, reiserfs).");
return try_with_device(dev_name);
}
@ -238,6 +239,7 @@ static enum return_type try_with_device(char *dev_name)
return try_with_device(dev_name);
}
iso = 1;
add_to_env("PIGGYBACK", "1");
}
if (IS_SPECIAL_STAGE2 || ramdisk_possible()) {
@ -275,8 +277,9 @@ static enum return_type try_with_device(char *dev_name)
my_mount(LIVE_DEVICE,STAGE2_LOCATION, (IS_LIVE) ? LIVEFS : STAGE2FS, 0);
method_name = strdup("disk");
add_to_env("DEVICE", choice);
add_to_env("METHOD", method_name);
add_to_env("PREFIX", iso ? "/" : answers_location[0]);
add_to_env("PREFIX", answers_location[0]);
return RETURN_OK;
}

View File

@ -164,6 +164,9 @@ int my_mount(char *dev, char *location, char *fs, int force_rw)
opts = "check=relaxed";
}
if (!strcmp(fs, "ntfs"))
my_insmod("ntfs", ANY_DRIVER_TYPE, NULL);
if (!strcmp(fs, "reiserfs"))
my_insmod("reiserfs", ANY_DRIVER_TYPE, NULL);

View File

@ -681,6 +681,7 @@ enum return_type nfs_prepare(void)
continue;
}
iso = 1;
add_to_env("PIGGYBACK", "1");
}
ramdisk_path = get_ramdisk_path(NULL);

2
url.c
View File

@ -424,7 +424,7 @@ int http_download_file(char * hostname, char * remotename, int * size)
}
buf = alloca(strlen(remotename) + 20);
sprintf(buf, "GET %s HTTP/0.9\r\n\r\n", remotename);
sprintf(buf, "GET %s HTTP/1.0\r\n\r\n", remotename);
write(sock, buf, strlen(buf));
/* This is fun; read the response a character at a time until we: