svn commit: r344238 - head/stand/common

Andrey V. Elsukov bu7cher at
Mon Feb 18 23:21:10 UTC 2019

18.02.2019 16:09, Toomas Soome пишет:
>>  This restores the old functionality by resetting d_offset to the start
>>  of the raw slice after disk_open() returns.  For good measure, d_partition
>>  is also set back to -1, although that doesn't currently affect anything.
>>  I would have preferred to make disk_open() avoid such rude assumptions and
>>  if you ask for partition -1 you get the raw slice.  But the commit history
>>  shows that someone already did that once (r239058), and had to revert it
>>  (r239232), so I didn't even try to go down that road.
> What was the reason for the revert? I still do think the current disk_open() approach is not good because it does break the promise to get MBR partition (see common/disk.h). 

The reason is that someone has reported that after the change the system
fails to boot.

> Of course I can see the appeal for something like “boot disk0:” but case like that should be solved by iterating partition table, and not by making API to do wrong thing - if I did ask to for disk0s0: I really would expect to get disk0s0: and not disk0s0a:
> But anyhow, it would be good to understand the actual reasoning behind that decision.

WBR, Andrey V. Elsukov

More information about the svn-src-all mailing list