partX: devices are unfortunately not so informative, so this patch is an
attempt to use existing partitioning code to present the devices in more
user friendly way.
Details
- Reviewers
allanjude imp - Commits
- rS313333: loader: Replace EFI part devices.
I have tested this code on illumos (where it was originally developed), with
usb/cd/disk boot. However, the same series of tests should be
performed on freebsd as well.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/boot/common/disk.c | ||
---|---|---|
283 ↗ | (On Diff #22351) | why would a disk_ioctl return NOTTY? |
There's another review out that goes a bit in the other direction. It creates a UEFI UFS driver for easier booting. Perhaps you can reconcile the two?
sys/boot/common/disk.c | ||
---|---|---|
283 ↗ | (On Diff #22351) | because ENOTTY means "ioctl not supported" |
sys/boot/common/disk.c | ||
---|---|---|
283 ↗ | (On Diff #22351) | Thats traditional way (esp. in stacked drivers) to say "I don't implement this stuff", so the next layer can answer instead. So when some another command is added, disk_ioctl will return ENOTTY and block driver can respond if it does implement it. Note the disk_ioctl implementation this way is kind of hack, I did not want to add up just random command code - as in fbsd the headers are actually shared between kernel and loader, but this way I can get the partition size, and it [the size of the partition] can be really helpful in different scenarios. |
you mean the one implementing efi file system layer? I dont think those two should necessarily be even conflicting, because as an human, you still would like to know what devices you have and where from you are booting from. This work does not touch the file systems, just the block devices behind the scenes.
Filter out nested partitions. At least AMI does create device tree like:
../Sata(..)/HD(1,GPT,...)/HD(1,MBR,...) for PMBR entry.
We only need the disk device handles and first level partition to help
us to identify the disk, we can just ignore nested partitions.
Adjust the device name printout on verbose lsdev to make it easier to read.
rebase on r312374, updated the NULL checks on efi_devpath_last_node()
and efi_devpath_trim().