From: Dirk Vogt Date: Mon, 7 Mar 2011 13:31:48 +0000 (+0000) Subject: Small fix, implemented getvid/did X-Git-Tag: v3.2.0~618 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/man.7.txt?a=commitdiff_plain;h=aca0749d71c0727bc57cd0a1f04e5e5dab3990cf;p=minix.git Small fix, implemented getvid/did --- diff --git a/lib/libddekit/src/pci.c b/lib/libddekit/src/pci.c index aaa01d0d0..3768a4f20 100644 --- a/lib/libddekit/src/pci.c +++ b/lib/libddekit/src/pci.c @@ -10,7 +10,6 @@ #include #include - #ifdef DDEBUG_LEVEL_PCI #undef DDEBUG #define DDEBUG DDEBUG_LEVEL_PCI @@ -297,7 +296,7 @@ PUBLIC struct ddekit_pci_dev *ddekit_pci_find_device { int i,search=0; - if(!start) + if(start) search = 1; for(i=0; i < PCI_MAX_DEVS ; i++) @@ -311,6 +310,9 @@ PUBLIC struct ddekit_pci_dev *ddekit_pci_find_device if ((*slot==dev->slot || *slot == DDEKIT_PCI_ANY_ID) && (*func==dev->func || *func == DDEKIT_PCI_ANY_ID)) { + *bus = 0; + *slot = dev->slot; + *func = dev->func; return dev; } } @@ -318,6 +320,22 @@ PUBLIC struct ddekit_pci_dev *ddekit_pci_find_device return 0; } +/****************************************************************************/ +/* ddekit_pci_get_vendor */ +/****************************************************************************/ +PUBLIC unsigned short ddekit_pci_get_vendor(struct ddekit_pci_dev *dev) +{ + return dev->vid; +} + +/****************************************************************************/ +/* ddekit_pci_get_device_id */ +/****************************************************************************/ +PUBLIC unsigned short ddekit_pci_get_device_id(struct ddekit_pci_dev *dev) +{ + return dev->did; +} + /* * XXX: Those are neither used be DDEFBSD or DDELinux implement them * when you need them @@ -349,23 +367,6 @@ PUBLIC void ddekit_pci_set_master(struct ddekit_pci_dev *dev) WARN_UNIMPL; } -/****************************************************************************/ -/* ddekit_pci_get_vendor */ -/****************************************************************************/ -PUBLIC unsigned short ddekit_pci_get_vendor(struct ddekit_pci_dev *dev) -{ - WARN_UNIMPL; - return 0; -} - -/****************************************************************************/ -/* ddekit_pci_get_device_id */ -/****************************************************************************/ -PUBLIC unsigned short ddekit_pci_get_device_id(struct ddekit_pci_dev *dev) -{ - WARN_UNIMPL; - return 0; -} /****************************************************************************/ /* ddekit_pci_get_sub_vendor */