summaryrefslogtreecommitdiffstats
path: root/loader2/modules.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-12-16 21:53:48 +0000
committerJeremy Katz <katzj@redhat.com>2002-12-16 21:53:48 +0000
commitabe211d70d9d3509c264f20389684e98e146f7be (patch)
treec489e36b7f843633530519fd9cbd83cb1e748409 /loader2/modules.c
parenta5587dd0906183302f8cf617408bf4a7036ea8b7 (diff)
downloadanaconda-abe211d70d9d3509c264f20389684e98e146f7be.tar.gz
anaconda-abe211d70d9d3509c264f20389684e98e146f7be.tar.xz
anaconda-abe211d70d9d3509c264f20389684e98e146f7be.zip
use the kudzu api properly. if devices is NULL, there aren't any disks
Diffstat (limited to 'loader2/modules.c')
-rw-r--r--loader2/modules.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/loader2/modules.c b/loader2/modules.c
index f640bacd9..38c2bce50 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -88,12 +88,14 @@ static int scsiCount(void) {
static int scsiDiskCount(void) {
- struct device ** devices, ** device;
+ struct device ** devices;
int i = 0;
devices = probeDevices(CLASS_HD, BUS_SCSI, PROBE_ALL);
+ if (!devices)
+ return 0;
- for (device = devices; *device; device++) i++;
+ for (i = 0; devices[i]; i++);
return i;
}
@@ -318,7 +320,6 @@ static int loadModule(const char * modName, struct extractedModule * path,
modLoaded->mods[num].major = DRIVER_NONE;
modLoaded->mods[num].minor = DRIVER_MINOR_NONE;
}
-
if (args) {
for (i=0, arg = args; *arg; arg++, i++);
newArgs = malloc(sizeof(*newArgs) * (i + 1));