rem: fd = bus_find_device_recurse(&n, path, base_fd, vendor_ids, device_ids); if(fd >= 0) {
add: fd = bus_find_device_recurse(&n, path, sizeof(path), base_fd, vendor_ids, device_ids); if (fd >= 0) {
context: int bus_find_device(int n, id_list *vendor_ids, id_list *device_ids, device *dev){	int base_fd;	int fd;	char path[256];	bus *b;	int err = -1;	for(b = bus_list; b != NULL && err < 0; b = b->next) {		base_fd = sys_open(b->path, STREAM_TYPE_DIR, 0);		if(base_fd < 0)			continue;		strlcpy(path, b->path, sizeof(path));		strlcat(path, "/", sizeof(path));		fd = bus_find_device_recurse(&n, path, base_fd, vendor_ids, device_ids);		if(fd >= 0) {			// we have a device!			// XXX assumes pci			struct pci_cfg cfg;			int i;			err = sys_ioctl(fd, PCI_GET_CFG, &cfg, sizeof(struct pci_cfg));			if(err >= 0) {				// copy the relevant data from the pci config to the more generic config				memset(dev, 0, sizeof(device));				dev->vendor_id = cfg.vendor_id;				dev->device_id = cfg.device_id;				dev->irq = cfg.irq;				for(i=0; i<6; i++) {					dev->base[i] = cfg.base[i];					dev->size[i] = cfg.size[i];				}				strcpy(dev->dev_path, path);			}			sys_close(fd);		}		sys_close(base_fd);	}	return err;}