--- loader/driverdisk.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/loader/driverdisk.c b/loader/driverdisk.c index bb6ed22..192beb0 100644 --- a/loader/driverdisk.c +++ b/loader/driverdisk.c @@ -361,7 +361,7 @@ int getRemovableDevices(char *** devNames) { devs = getDevices(DEVICE_DISK | DEVICE_CDROM); - for (i = 0; devs[i] ; i++) { + if(devs) for (i = 0; devs[i] ; i++) { if (devs[i]->priv.removable) { *devNames = realloc(*devNames, (numDevices + 2) * sizeof(char *)); (*devNames)[numDevices] = strdup(devs[i]->device); @@ -369,9 +369,11 @@ int getRemovableDevices(char *** devNames) { numDevices ++; } } + if (!numDevices) { logMessage(ERROR, "no devices found to load drivers from"); } + return numDevices; } -- 1.6.6.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list