diff options
Diffstat (limited to 'sys/boot/i386/libi386/bootinfo.c')
-rw-r--r-- | sys/boot/i386/libi386/bootinfo.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/boot/i386/libi386/bootinfo.c b/sys/boot/i386/libi386/bootinfo.c index 9b1368c..8e5c752 100644 --- a/sys/boot/i386/libi386/bootinfo.c +++ b/sys/boot/i386/libi386/bootinfo.c @@ -277,21 +277,30 @@ bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip) bootdevnr = 0; switch(rootdev->d_type) { + case DEVT_CD: + /* Pass in BIOS device number. */ + bi.bi_bios_dev = bc_unit2bios(rootdev->d_kind.bioscd.unit); + bootdevnr = bc_getdev(rootdev); + if (bootdevnr != -1) + *howtop |= RB_CDROM; + break; + case DEVT_DISK: /* pass in the BIOS device number of the current disk */ bi.bi_bios_dev = bd_unit2bios(rootdev->d_kind.biosdisk.unit); bootdevnr = bd_getdev(rootdev); - if (bootdevnr != -1) - break; - printf("root device %s invalid\n", i386_fmtdev(rootdev)); - return(EINVAL); - + break; + case DEVT_NET: break; default: printf("WARNING - don't know how to boot from device type %d\n", rootdev->d_type); } + if (bootdevnr == -1) { + printf("root device %s invalid\n", i386_fmtdev(rootdev)); + return (EINVAL); + } free(rootdev); *bootdevp = bootdevnr; |