Re: [PATCH 5/7] Backport the RHEL5 DriverDisc functionality

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

 



> +    size = fread(description, 1, 255, f);
> +    if (size == 0) {
> +        free(description);
> +        return NULL;
> +    }
> +
> +    description[size-1]=0; /* strip the trailing newline */
> +    pclose(f);
> +
> +    return description;
> +}
> +
> +int globErrFunc(const char *epath, int eerrno)
> +{
> +    /* TODO check fatal errors */
> +
> +    return 0;
> +}

I think pjones's comments from
https://www.redhat.com/archives/anaconda-devel-list/2009-December/msg00421.html
still apply here.

>  static int verifyDriverDisk(char *mntpt) {
>      char ** fnPtr;
>      char file[200];
>      struct stat sb;
>  
> -    for (fnPtr = driverDiskFiles; *fnPtr; fnPtr++) {
> -        sprintf(file, "%s/%s", mntpt, *fnPtr);
> -        if (access(file, R_OK)) {
> -            logMessage(ERROR, "cannot find %s, bad driver disk", file);
> -            return LOADER_BACK;
> -        }
> -    }
> -
> -    /* check for both versions */
> -    sprintf(file, "%s/rhdd", mntpt);
> +    /* check for dd descriptor */
> +    sprintf(file, "%s/rhdd3", mntpt);
>      if (access(file, R_OK)) {
> -        logMessage(DEBUGLVL, "not a new format driver disk, checking for old");
> -        sprintf(file, "%s/rhdd-6.1", mntpt);
> -        if (access(file, R_OK)) {
> -            logMessage(ERROR, "can't find either driver disk identifier, bad "
> -                       "driver disk");
> -        }
> +        logMessage(ERROR, "can't find driver disk identifier, bad "
> +                          "driver disk");
> +        return LOADER_BACK;
>      }
>  
>      /* side effect: file is still mntpt/ddident */
>      stat(file, &sb);
>      if (!sb.st_size)
>          return LOADER_BACK;
> +    for (fnPtr = driverDiskFiles; *fnPtr; fnPtr++) {
> +        snprintf(file, 200, "%s/%s/%s", mntpt, getProductArch(), *fnPtr);
> +        if (access(file, R_OK)) {
> +            logMessage(ERROR, "cannot find %s, bad driver disk", file);
> +            return LOADER_BACK;
> +        }
> +    }
>  
>      return LOADER_OK;
>  }

Likewise here.

- Chris

_______________________________________________
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