diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-12-27 05:16:57 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-12-27 05:16:57 +0000 |
commit | 345813c57c3fd10b66b10a1b544f7bd0f3950a7a (patch) | |
tree | 30623a2937aeacb2fc8026ce206c053e375249a9 /isys | |
parent | 26223b23aeb01e4b428c12fa5881280a21eaaec0 (diff) | |
download | anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.tar.gz anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.tar.xz anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.zip |
whee! merge the first bunch of changes from the 390 branch. this
incorporates most of the python changes as well as the isys changes.
email with what hasn't been applied coming later after I either finish merging
the rest or decide to stop for the night
Diffstat (limited to 'isys')
-rw-r--r-- | isys/devnodes.c | 4 | ||||
-rw-r--r-- | isys/probe.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/isys/devnodes.c b/isys/devnodes.c index a04e5e2b2..e8a76c62d 100644 --- a/isys/devnodes.c +++ b/isys/devnodes.c @@ -163,12 +163,12 @@ int devMakeInode(char * devName, char * path) { if (devName[3]) minor += devName[3] - '1'; #if defined (__s390__) || defined (__s390x__) - } else if (!strncmp(devName, "dasd", 4)) { + } else if (!strncmp(devName, "dasd", 4) && strlen(devName) > 4) { /* IBM Dasd Drives */ type = S_IFBLK; major = 94; minor = ( devName[4] - 'a' ) * 4; - if (devName[5]) + if (devName[5] && isdigit(devName[5]) ) minor += devName[5] - '0'; } else if (!strncmp(devName, "mnd", 4)) { /* IBM MiniDisk Drives */ diff --git a/isys/probe.c b/isys/probe.c index d3db6577d..a02c9a429 100644 --- a/isys/probe.c +++ b/isys/probe.c @@ -422,10 +422,12 @@ int kdFindDasdList(struct knownDevices * devices, int code) { /* Every line in this file is a harddisk */ while ((fgets(line, 190, fd)) != NULL) { - sscanf(line, "%*X %*[(A-Z)] at (%*d:%*d) is %[a-z0-9]:%s ", name, status); + int num; + num = sscanf(line, "%*X %*[(A-Z)] at (%*d:%*d) is %[a-z0-9] : %s ", + name, status); /* Take every dasd, formated and unformated */ - if (!deviceKnown(devices, name)) { + if ((num == 2) && (strlen(name) <= 6) && !deviceKnown(devices, name)) { snprintf(model, sizeof(model), "IBM DASD (%s)", status); device.class = CLASS_HD; device.name = strdup(name); |