Teach userboot to boot from ISO image files.
Reviewed by: ae@, dfr@ Obtained from: NetApp
This commit is contained in:
parent
4f6c4eb93a
commit
8e2c4dfdb2
@ -57,6 +57,7 @@ struct devsw *devsw[] = {
|
||||
struct fs_ops *file_system[] = {
|
||||
&host_fsops,
|
||||
&ufs_fsops,
|
||||
&cd9660_fsops,
|
||||
&gzipfs_fsops,
|
||||
NULL
|
||||
};
|
||||
|
@ -153,11 +153,13 @@ extract_currdev(void)
|
||||
dev.d_slice = 0;
|
||||
dev.d_partition = 0;
|
||||
/*
|
||||
* Figure out if we are using MBR or GPT - for GPT we
|
||||
* set the partition to 0 since everything is a GPT slice.
|
||||
* If we cannot auto-detect the partition type then
|
||||
* access the disk as a raw device.
|
||||
*/
|
||||
if (dev.d_dev->dv_open(NULL, &dev))
|
||||
dev.d_partition = 255;
|
||||
if (dev.d_dev->dv_open(NULL, &dev)) {
|
||||
dev.d_slice = -1;
|
||||
dev.d_partition = -1;
|
||||
}
|
||||
} else {
|
||||
dev.d_dev = &host_dev;
|
||||
dev.d_type = dev.d_dev->dv_type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user