static void setconf(void) { u_int32_t flags; kern_return_t err; err = IOFindBSDRoot(rootdevice, sizeof(rootdevice), &rootdev, &flags); if( err) { printf("setconf: IOFindBSDRoot returned an error (%d);" "setting rootdevice to 'sd0a'.\n", err); /* XXX DEBUG TEMP */ rootdev = makedev( 6, 0 ); strlcpy(rootdevice, "sd0a", sizeof(rootdevice)); flags = 0; } #if NFSCLIENT if( flags & 1 ) { /* network device */ mountroot = netboot_mountroot; } else { #endif /* otherwise have vfs determine root filesystem */ mountroot = NULL; #if NFSCLIENT } #endif }
static void setconf(void) { u_int32_t flags; kern_return_t err; /* * calls into IOKit can generate networking registrations * which needs to be under network funnel. Right thing to do * here is to drop the funnel alltogether and regrab it afterwards */ err = IOFindBSDRoot(rootdevice, sizeof(rootdevice), &rootdev, &flags); if( err) { printf("setconf: IOFindBSDRoot returned an error (%d);" "setting rootdevice to 'sd0a'.\n", err); /* XXX DEBUG TEMP */ rootdev = makedev( 6, 0 ); strlcpy(rootdevice, "sd0a", sizeof(rootdevice)); flags = 0; } #if NFSCLIENT if( flags & 1 ) { /* network device */ mountroot = netboot_mountroot; } else { #endif /* otherwise have vfs determine root filesystem */ mountroot = NULL; #if NFSCLIENT } #endif }