Ticket #3124: fbsd_compat.diff
File fbsd_compat.diff, 5.1 KB (added by , 16 years ago) |
---|
-
src/system/kernel/device_manager/devfs.cpp
215 215 { 216 216 struct devfs_vnode* vnode; 217 217 218 if (name[0] < 0) 219 panic("devfs_create_vnode: name[0] < 0"); 220 218 221 vnode = (struct devfs_vnode*)malloc(sizeof(struct devfs_vnode)); 219 222 if (vnode == NULL) 220 223 return NULL; -
src/system/kernel/fs/vfs.cpp
5470 5470 return B_BAD_ADDRESS; 5471 5471 5472 5472 ASSERT(entry->d_reclen >= sizeof(struct dirent)); 5473 ASSERT(entry->d_reclen <= sizeof(buffer)); 5473 5474 5474 5475 if (user_memcpy(entry->d_name, userEntry->d_name, 5475 entry->d_reclen - sizeof(struct dirent) ) != B_OK)5476 entry->d_reclen - sizeof(struct dirent) + 1) != B_OK) 5476 5477 return B_BAD_ADDRESS; 5477 5478 } else 5478 5479 entry = userEntry; -
src/libs/compat/freebsd_network/if.c
101 101 driver_printf("%s: /dev/%s\n", gDriverName, ifp->device_name); 102 102 103 103 gDeviceNameList[ifp->if_index] = ifp->device_name; 104 ktrace_printf("if_initname: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 104 105 gDevices[ifp->if_index] = ifp; 105 106 106 107 ifp->root_device = find_root_device(unit); … … 309 310 void 310 311 ether_ifattach(struct ifnet *ifp, const uint8_t *macAddress) 311 312 { 313 ktrace_printf("ether_ifattach: a: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 312 314 ifp->if_addrlen = ETHER_ADDR_LEN; 313 315 ifp->if_hdrlen = ETHER_HDR_LEN; 314 316 if_attach(ifp); … … 324 326 // once all drivers are cleaned up. 325 327 if (macAddress != IFP2ENADDR(ifp)) 326 328 memcpy(IFP2ENADDR(ifp), macAddress, ETHER_ADDR_LEN); 329 ktrace_printf("ether_ifattach: b: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 327 330 } 328 331 329 332 -
src/libs/compat/freebsd_network/device.c
33 33 break; 34 34 } 35 35 36 ktrace_printf("compat_open: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 37 36 38 if (gDeviceNameList[i] == NULL) 37 39 return B_ERROR; 38 40 -
src/libs/compat/freebsd_network/compat/sys/haiku-module.h
74 74 void uninit_driver() \ 75 75 { _fbsd_uninit_driver(DRIVER_MODULE_NAME(name, busname)); } \ 76 76 const char **publish_devices() \ 77 { return gDeviceNameList; } \77 { ktrace_printf("publish_devices: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); return gDeviceNameList; } \ 78 78 device_hooks *find_device(const char *name) \ 79 79 { return &gDeviceHooks; } 80 80 -
src/libs/compat/freebsd_network/compat.c
377 377 if (result == 0) 378 378 atomic_or(&device->flags, DEVICE_ATTACHED); 379 379 380 ktrace_printf("device_attach: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 381 380 382 return result; 381 383 } 382 384 … … 404 406 bus_generic_attach(device_t dev) 405 407 { 406 408 device_t child = NULL; 409 ktrace_printf("bus_generic_attach: a: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 407 410 408 411 while ((child = list_get_next_item(&dev->children, child)) != NULL) { 409 412 if (child->driver == NULL) { … … 424 427 return result; 425 428 } 426 429 } 430 ktrace_printf("bus_generic_attach: b: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 427 431 428 432 return 0; 429 433 } … … 433 437 bus_generic_detach(device_t device) 434 438 { 435 439 device_t child = NULL; 440 ktrace_printf("bus_generic_detach: a: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 436 441 437 442 if ((device->flags & DEVICE_ATTACHED) == 0) 438 443 return B_ERROR; … … 444 449 445 450 device_detach(child); 446 451 } 452 ktrace_printf("bus_generic_detach: b: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 447 453 448 454 return 0; 449 455 } -
src/libs/compat/freebsd_network/driver.c
58 58 device_delete_child(NULL, root); 59 59 return B_NO_MEMORY; 60 60 } 61 ktrace_printf("init_root_device: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 61 62 62 63 root->driver = &sRootDriver; 63 64 root->root = root; … … 125 126 break; 126 127 } 127 128 } 129 ktrace_printf("_fbsd_init_hardware: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 128 130 129 131 if (status < B_OK) 130 132 TRACE(("%s: no hardware found.\n", gDriverName)); … … 181 183 182 184 if (device_attach(device) == 0) 183 185 found = true; 186 ktrace_printf("_fbsd_init_driver: gDeviceNameList[0]=%s\n", gDeviceNameList[0]); 184 187 185 188 i++; 186 189 break;