Re: [PATCH] No longer force ISOs to be on ext2, ext3, or vfat partitions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-04-17 at 15:02 -0400, Chris Lumens wrote: 
> This also changes it so the test for testing mode doesn't mean the rest of
> the function gets indented.
> ---
>  loader/hdinstall.c |  111 ++++++++++++++++++++++++----------------------------
>  1 files changed, 51 insertions(+), 60 deletions(-)
> 
> diff --git a/loader/hdinstall.c b/loader/hdinstall.c
> index e27b04a..46f604e 100644
> --- a/loader/hdinstall.c
> +++ b/loader/hdinstall.c
> @@ -58,85 +58,76 @@ extern uint64_t flags;
>  static char * setupIsoImages(char * device, char * dirName, char * location) {
>      int rc = 0;
>      char *url = NULL, *dirspec, *updpath, *path;
> -    char *typetry[] = {"ext3", "ext2", "vfat", NULL};
> -    char **type;
>  
>      logMessage(INFO, "mounting device %s for hard drive install", device);
>  
> -    if (!FL_TESTING(flags)) {
> -        for (type=typetry; *type; type++) {
> -            if (!doPwMount(device, "/mnt/isodir", *type, "ro", NULL))
> -                break;
> -        }
> +    if (FL_TESTING(flags))
> +        return NULL;
>  
> -        if (!type)
> -            return NULL;
> +    if (doPwMount(device, "/mnt/isodir", "auto", "ro", NULL))
> +        return NULL;
>  
> -        if (asprintf(&dirspec, "/mnt/isodir%.*s",
> -                     (int) (strrchr(dirName, '/') - dirName), dirName) == -1) {
> -            logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
> -            abort();
> -        }
> +    if (asprintf(&dirspec, "/mnt/isodir%.*s",
> +                 (int) (strrchr(dirName, '/') - dirName), dirName) == -1) {
> +        logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
> +        abort();
> +    }
>  
> -        if (asprintf(&path, "/mnt/isodir%s", dirName) == -1) {
> -            logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
> -            abort();
> -        }
> +    if (asprintf(&path, "/mnt/isodir%s", dirName) == -1) {
> +        logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
> +        abort();
> +    }
>  
> -        if (path) {
> -            logMessage(INFO, "Path to stage2 image is %s", path);
> +    if (path) {
> +        logMessage(INFO, "Path to stage2 image is %s", path);
>  
> -            rc = copyFile(path, "/tmp/install.img");
> -            rc = mountStage2("/tmp/install.img");
> +        rc = copyFile(path, "/tmp/install.img");
> +        rc = mountStage2("/tmp/install.img");
>  

When booting from usb and passing stage2= this memory never gets freed
later in the install. The install.img doesn't get copied to sysimage and
install.img remains in memory. Now that stage2= is an absolute path to
the image, maybe we could just leave /mnt/isodir mounted, and mount
stage2.img straight away, kind of like the boot.iso does? 

Jerry


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux