You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was reported long time ago in FreeBSD bug tracker, user complains that sg_persist -i -s da0 (e.g. called on device name as opposed to full path /dev/da0) stopped working after update from 1.42 to 1.44. This may be a regression introduced by d82f040, there's now a stat(2) call on a specified path:
which requires a valid path, however the device name is later passed to cam_get_device(3) which performs additional parsing
cam_get_device() takes a path argument containing a string with a device
name followed by a unit number. It then breaks the string down into a
device name and unit number, and passes them back in dev_name and unit,
respectively. cam_get_device() can handle strings of the following
forms, at least:
/dev/foo1
foo0
nsa2
cam_get_device() is provided as a convenience function for applications
that need to provide functionality similar to cam_open_device().
My guess here is that the current logic which expects raw path no longer allows to specify a unit number, and maybe cam_get_device should be called early to split dev name first which can be then passed to stat and other checks.
Note that I don't use sg3_utils, just conveying a potential problem.
The text was updated successfully, but these errors were encountered:
This was reported long time ago in FreeBSD bug tracker, user complains that
sg_persist -i -s da0
(e.g. called on device name as opposed to full path/dev/da0
) stopped working after update from 1.42 to 1.44. This may be a regression introduced by d82f040, there's now astat(2)
call on a specified path:sg3_utils/lib/sg_pt_freebsd.c
Line 185 in d82f040
which requires a valid path, however the device name is later passed to
cam_get_device(3)
which performs additional parsingMy guess here is that the current logic which expects raw path no longer allows to specify a unit number, and maybe cam_get_device should be called early to split dev name first which can be then passed to
stat
and other checks.Note that I don't use sg3_utils, just conveying a potential problem.
The text was updated successfully, but these errors were encountered: