X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fdrv%2Fpci.c;h=43d6d544299cd6918693131a27c9e2ed2e7e1a83;hb=391af300bd045791b8aaf50cf44b2d503c763213;hp=35977e1281cf352b721ce6827d92acd22ff39f1f;hpb=d7801bfc828d3328ac9a0172db8a71b8f33c4a19;p=tpg%2Facess2.git diff --git a/Kernel/drv/pci.c b/Kernel/drv/pci.c index 35977e12..43d6d544 100644 --- a/Kernel/drv/pci.c +++ b/Kernel/drv/pci.c @@ -1,13 +1,13 @@ /* -AcessOS/AcessBasic v0.1 -PCI Bus Driver -*/ + * AcessOS/AcessBasic v0.1 + * PCI Bus Driver + */ +#define DEBUG 0 #include #include #include #include -#define DEBUG 0 #define LIST_DEVICES 1 // === STRUCTURES === @@ -156,15 +156,19 @@ int PCI_Install(char **Arguments) } /** - * \fn char *PCI_ReadDirRoot(tVFS_Node *node, int pos) + * \fn char *PCI_ReadDirRoot(tVFS_Node *Node, int Pos) * \brief Read from Root of PCI Driver */ -char *PCI_ReadDirRoot(tVFS_Node *node, int pos) -{ - if(pos < 0 || pos >= giPCI_DeviceCount) +char *PCI_ReadDirRoot(tVFS_Node *Node, int Pos) +{ + ENTER("pNode iPos", Node, Pos); + if(Pos < 0 || Pos >= giPCI_DeviceCount) { + LEAVE('n'); return NULL; + } - return strdup( gPCI_Devices[pos].Name ); + LEAVE('s', gPCI_Devices[Pos].Name); + return strdup( gPCI_Devices[Pos].Name ); } /** * \fn tVFS_Node *PCI_FindDirRoot(tVFS_Node *node, char *filename) @@ -464,7 +468,7 @@ int PCI_EnumDevice(Uint16 bus, Uint16 slot, Uint16 fcn, t_pciDevice *info) info->Name[2] = '.'; info->Name[3] = '0' + slot/10; info->Name[4] = '0' + slot%10; - info->Name[5] = '.'; + info->Name[5] = ':'; info->Name[6] = '0' + fcn; info->Name[7] = '\0';