📄 kudzu-support.h
字号:
/* * Compaq Hot Plug Controller Graphical User Interface * Copyright 2000, 2001 Compaq Computer Corporation * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Please send all questions or concerns to linuxhotplug@compaq.com */#ifndef _KUDZU_PCI_H_#define _KUDZU_PCI_H_enum deviceClass { /* device classes... this is somewhat ad-hoc */ CLASS_UNSPEC, CLASS_OTHER, CLASS_NETWORK, CLASS_SCSI, CLASS_VIDEO, CLASS_AUDIO, CLASS_MOUSE, CLASS_MODEM, CLASS_CDROM, CLASS_TAPE, CLASS_FLOPPY, CLASS_SCANNER, CLASS_HD, CLASS_RAID, CLASS_PRINTER, CLASS_CAPTURE, CLASS_KEYBOARD, CLASS_PCMCIA};enum deviceBus { /* 'bus' that a device is attached to... this is also ad-hoc */ /* BUS_SBUS is sort of a misnomer - it's more or less Sun */ /* OpenPROM probing of all various associated non-PCI buses */ BUS_UNSPEC = 0, BUS_OTHER = (1 << 0), BUS_PCI = (1 << 1), BUS_SBUS = (1 << 2), BUS_PSAUX = (1 << 3), BUS_SERIAL = (1 << 4), BUS_PARALLEL = (1 << 5), BUS_SCSI = (1 << 6), BUS_IDE = (1 << 7), /* Again, misnomer */ BUS_KEYBOARD = (1 << 8),#ifdef _i_wanna_build_this_crap_ BUS_ISAPNP = (1 << 9),#endif};/* Cardbus stuff can show up as PCI. *//* Start at 1 so we don't do weird stuff on previous installations. */#define PCI_UNKNOWN 0#define PCI_NORMAL 1#define PCI_CARDBUS 2struct pciDevice { /* common fields */ struct device *next; /* next device in list */ int index; enum deviceClass class; /* type */ enum deviceBus bus; /* bus it's attached to */ char * device; /* device file associated with it */ char * driver; /* driver to load, if any */ char * desc; /* a description */ int detached; /* pci-specific fields */ struct pciDevice *(*newDevice) (struct pciDevice *dev); void (*freeDevice) (struct pciDevice *dev); void (*writeDevice) (FILE *file, struct pciDevice *dev); int (*compareDevice) (struct pciDevice *dev1, struct pciDevice *dev2); unsigned int vendorId; /* vendor id */ unsigned int deviceId; /* device id */ int pciType; /* type of PCI bus */};int lookupDevID(unsigned short bus, unsigned short devfn, unsigned short* vendID, unsigned short* devID);int lookupSubDevID(unsigned short bus, unsigned short devfn, unsigned short* vendID, unsigned short* devID);int lookupDevice(unsigned int vendorId, unsigned int deviceId, char* device, char* driver); int pciReadDrivers(char *filename);void pciFreeDrivers();#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -