Issue 387: Incorrect logic in open_bvdev()

Reported by zenith432, Dec 4, 2014

There is a minor bug in open_bvdev() in libsaio/sys.c.

It receives a device name bvr (which is always supplied as 
"bt(0,0)" in practice) and pathname.

If the pathname is device-less, like

Then it tries looking on the root volume (gRootVolume), and if that 
fails, it tries "bt(0,0)/Extra/filename".

However, if the pathname is passed with a device, like

[This happens for instance when called from getOSVersion())

Then it tries the exact match (on hd(0,1)), and then tries to open 
"bt(0,0)/hd(0,1)/Extra/filename" - which doesn't make any 

This doesn't appear to have any dire impact (always fails with error 
return code.)

I'm not attaching a patch, because I don't know what the author of 
this function intended.

Comment 1 by zenith432, Dec 31, 2014

This is fixed in r2524 (change to sys.c)

Comment 2 by ErmaC , Jan 5, 2015

Thx Zenith432.
Status: Fixed

Created: 6 years 10 months ago by zenith432

Updated: 6 years 9 months ago

Status: Fixed

Followed by: 1 person