kern_return_t host_get_boot_info( host_t priv_host, kernel_boot_info_t boot_info) { char *src = ""; extern char * machine_boot_info( kernel_boot_info_t boot_info, vm_size_t buf_len); #if DIPC && (NORMA_SCSI || DIPC_XKERN) char *p; #define NORMA_SCSI_BOOT_INFO \ "ROOT_FS_NODE=0\nBOOT_NODE_LIST=0..7\nACCEPT_PROCS=1..7\nTIMESHARE_NODES=0..7\n" #endif /* DIPC && (NORMA_SCSI || DIPC_XKERN) */ if (priv_host == HOST_NULL) { return KERN_INVALID_HOST; } /* * Copy first operator string terminated by '\0' followed by * standardized strings generated from boot string. */ src = machine_boot_info(boot_info, KERNEL_BOOT_INFO_MAX); if (src != boot_info) (void) strncpy(boot_info, src, KERNEL_BOOT_INFO_MAX); #if DIPC && (NORMA_SCSI || DIPC_XKERN) /* * Add NORMA boot string after a '\n' if there is enough space. */ p = boot_info; while (*p != '\0') p++; if (p - boot_info + strlen(NORMA_SCSI_BOOT_INFO) < KERNEL_BOOT_INFO_MAX - 2) { *p++ = '\n'; *p = '\0'; (void) strcpy(p, NORMA_SCSI_BOOT_INFO); } #endif /* DIPC && (NORMA_SCSI || DIPC_XKERN) */ return KERN_SUCCESS; }
kern_return_t host_get_boot_info( host_priv_t host_priv, kernel_boot_info_t boot_info) { const char *src = ""; if (host_priv == HOST_PRIV_NULL) return (KERN_INVALID_HOST); assert(host_priv == &realhost); /* * Copy first operator string terminated by '\0' followed by * standardized strings generated from boot string. */ src = machine_boot_info(boot_info, KERNEL_BOOT_INFO_MAX); if (src != boot_info) (void) strncpy(boot_info, src, KERNEL_BOOT_INFO_MAX); return (KERN_SUCCESS); }