freebsd-nq/lib/libcam
Andriy Gapon e32acf95ea cam_get_device: resolve path links before parsing device name
The CAM subsystem uses bus:taget:lun tuple to address peripherals.  But
for convenience many userland programs such as camcontrol accept devices
names such as da0.  There is a libcam function, cam_open_device, to
support that.  It first calls cam_get_device() to parse the device name
as a driver name and a unit (and handle some special device name
prefixes) and then uses cam_lookup_pass() to find a matching pass
device.

This change extends cam_get_device() to apply realpath(3) to the device
name before parsing it.  This will allow to use tools such as camcontrol
and smartctl with symbolic links that could be friendlier (more
distinguished) names for devices.

Relnotes:	maybe

(cherry picked from commit 1abf1e8c6b)
2022-02-16 09:52:53 +02:00
..
tests Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
cam_cdbparse.3 Remove unused cam ccb flags 2020-03-10 23:58:41 +00:00
cam.3 libcam(3): make cam_getccb(3) zero the whole ccb, not just the header 2020-12-29 14:26:06 +00:00
camlib.c cam_get_device: resolve path links before parsing device name 2022-02-16 09:52:53 +02:00
camlib.h
Makefile pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
scsi_cmdparse.c