Previously, we were processing the argument as an int, which is incorrect. It's
expected to be of the form MMpN where MM is the disk's number and N is the
partition number on that disk.
- if (!dev && !src) {
+ if (!dev && !biospart && !src) {
logMessage(ERROR, "bad arguments to kickstart driver disk command");
return;
}
- if (usebiosdev != 0) {
- p = strchr(dev,'p');
+ if (biospart) {
+ char *disk = NULL;
+
+ p = strchr(biospart,'p');
if (!p){
logMessage(ERROR, "Bad argument for biospart");
return;
}
*p = ' ';
-
- biospart = getBiosDisk(dev);
- if (biospart == NULL) {
- logMessage(ERROR, "Unable to locate BIOS dev %s",dev);
+
+ disk = getBiosDisk(biospart);
+ if (disk == NULL) {
+ logMessage(ERROR, "Unable to locate BIOS dev %s", biospart);
return;
}
- dev = malloc(strlen(biospart) + strlen(p + 1) + 2);
+ dev = malloc(strlen(disk) + strlen(p + 1) + 2);
sprintf(dev, "%s%s", biospart, p + 1);
}
--
1.7.1.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
08-06-2010, 08:09 PM
David Cantrell
Correct processing of driverdisk --biospart=.
Ack.
On Fri, 6 Aug 2010, Chris Lumens wrote:
Previously, we were processing the argument as an int, which is incorrect. It's
expected to be of the form MMpN where MM is the disk's number and N is the
partition number on that disk.