summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-05-09 16:52:57 +0000
committerErik Troan <ewt@redhat.com>2000-05-09 16:52:57 +0000
commit39cebd1dd0360319d5a2a73411773bba74ba8d7a (patch)
tree095fa3fc1e88be48f1ff6785b74f6cec7e2a5337 /isys
parent909d3d8b819379410623debde7245f7d0dcee0b1 (diff)
downloadanaconda-39cebd1dd0360319d5a2a73411773bba74ba8d7a.tar.gz
anaconda-39cebd1dd0360319d5a2a73411773bba74ba8d7a.tar.xz
anaconda-39cebd1dd0360319d5a2a73411773bba74ba8d7a.zip
added code tags
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.c6
-rw-r--r--isys/probe.c10
-rw-r--r--isys/probe.h7
3 files changed, 14 insertions, 9 deletions
diff --git a/isys/isys.c b/isys/isys.c
index bd26b0f0b..efefca02e 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -796,7 +796,7 @@ static void probedListDealloc (probedListObject * o) {
static PyObject * probedListNet(probedListObject * o, PyObject * args) {
if (!PyArg_ParseTuple(args, "")) return NULL;
- kdFindNetList(&o->list);
+ kdFindNetList(&o->list, 0);
Py_INCREF(Py_None);
return Py_None;
@@ -805,7 +805,7 @@ static PyObject * probedListNet(probedListObject * o, PyObject * args) {
static PyObject * probedListScsi(probedListObject * o, PyObject * args) {
if (!PyArg_ParseTuple(args, "")) return NULL;
- kdFindScsiList(&o->list);
+ kdFindScsiList(&o->list, 0);
Py_INCREF(Py_None);
return Py_None;
@@ -814,7 +814,7 @@ static PyObject * probedListScsi(probedListObject * o, PyObject * args) {
static PyObject * probedListIde(probedListObject * o, PyObject * args) {
if (!PyArg_ParseTuple(args, "")) return NULL;
- kdFindIdeList(&o->list);
+ kdFindIdeList(&o->list, 0);
Py_INCREF(Py_None);
return Py_None;
diff --git a/isys/probe.c b/isys/probe.c
index 468c6cebc..b312b7a55 100644
--- a/isys/probe.c
+++ b/isys/probe.c
@@ -55,7 +55,7 @@ void kdFree(struct knownDevices * devices) {
devices->numKnown = devices->numKnownAlloced = 0;
}
-int kdFindNetList(struct knownDevices * devices) {
+int kdFindNetList(struct knownDevices * devices, int code) {
int fd;
char buf[1024];
char * start, * end;
@@ -95,6 +95,7 @@ int kdFindNetList(struct knownDevices * devices) {
newDevice.name = strdup(start);
newDevice.model = NULL;
newDevice.class = CLASS_NETWORK;
+ newDevice.code = code;
addDevice(devices, newDevice);
}
@@ -108,7 +109,7 @@ int kdFindNetList(struct knownDevices * devices) {
return 0;
}
-int kdFindIdeList(struct knownDevices * devices) {
+int kdFindIdeList(struct knownDevices * devices, int code) {
DIR * dir;
char path[80];
int fd, i;
@@ -131,6 +132,8 @@ int kdFindIdeList(struct knownDevices * devices) {
close(fd);
path[i - 1] = '\0'; /* chop off trailing \n */
+ device.code = code;
+
device.class = CLASS_UNSPEC;
if (!strcmp(path, "cdrom"))
device.class = CLASS_CDROM;
@@ -169,7 +172,7 @@ int kdFindIdeList(struct knownDevices * devices) {
#define SCSISCSI_VENDOR 2
#define SCSISCSI_TYPE 3
-int kdFindScsiList(struct knownDevices * devices) {
+int kdFindScsiList(struct knownDevices * devices, int code) {
int fd;
char buf[16384];
char linebuf[80];
@@ -301,6 +304,7 @@ int kdFindScsiList(struct knownDevices * devices) {
if (*typebuf && !deviceKnown(devices, typebuf)) {
device.name = strdup(typebuf);
device.model = strdup(linebuf);
+ device.code = code;
/* Do we need this for anything?
sdi[numMatches].bus = 0;
diff --git a/isys/probe.h b/isys/probe.h
index f236a9845..ea14b5d94 100644
--- a/isys/probe.h
+++ b/isys/probe.h
@@ -7,6 +7,7 @@ struct kddevice {
char * name; /* malloced */
char * model;
enum deviceClass class;
+ int code;
};
struct knownDevices {
@@ -16,9 +17,9 @@ struct knownDevices {
};
struct knownDevices kdInit(void);
-int kdFindNetList(struct knownDevices * devices);
-int kdFindIdeList(struct knownDevices * devices);
-int kdFindScsiList(struct knownDevices * devices);
+int kdFindNetList(struct knownDevices * devices, int code);
+int kdFindIdeList(struct knownDevices * devices, int code);
+int kdFindScsiList(struct knownDevices * devices, int code);
void kdFree(struct knownDevices * devices);
void kdAddDevice(struct knownDevices * devices, enum deviceClass devClass,
char * devName, char * devModel);