aboutsummaryrefslogtreecommitdiff
path: root/lib/libcam/cam.3
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2010-10-11 09:27:37 +0000
committerAndriy Gapon <avg@FreeBSD.org>2010-10-11 09:27:37 +0000
commit5bcc8fafda6c52693c64bdcf42ab02d066e6fb88 (patch)
tree319e6771ec96d6267eacbb3f052cbbf379a12a37 /lib/libcam/cam.3
parent921f8a1b40b4b1ca9df2d8149fcec439f0ae443e (diff)
downloadsrc-5bcc8fafda6c52693c64bdcf42ab02d066e6fb88.tar.gz
src-5bcc8fafda6c52693c64bdcf42ab02d066e6fb88.zip
cam_get_device, cam_open_device: make behavior simpler and more deterministic
Remove or re-work support for the several features from the past: - remove incomplete support for trimming slice/partition names - remove mapping from old device names "sd" and "st" - remove whitespace trimming - remove unconditional skipping of leading 'r' in a device name - skip leading 'n' or 'e' only if the following device name matches a list of known devices that support no-rewind and eject-on-close features; currently this is only sa(4) - reflect the above changes in comments in code and in cam(3) - remove a note cautioning against use of cam_get_device and cam_open_device in cam(3) Reviewed by: mjacob
Notes
Notes: svn path=/head/; revision=213682
Diffstat (limited to 'lib/libcam/cam.3')
-rw-r--r--lib/libcam/cam.314
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/libcam/cam.3 b/lib/libcam/cam.3
index 25328c24060c..c11d8fdb21ac 100644
--- a/lib/libcam/cam.3
+++ b/lib/libcam/cam.3
@@ -190,12 +190,6 @@ into a device name and unit number.
Once the device name and unit number
are determined, a lookup is performed to determine the passthrough device
that corresponds to the given device.
-.Fn cam_open_device
-is rather simple to use, but it is not really suitable for general use
-because its behavior is not necessarily deterministic.
-Programmers writing
-new applications should make the extra effort to use one of the other open
-routines documented below.
.Pp
.Fn cam_open_spec_device
opens the
@@ -354,19 +348,15 @@ respectively.
can handle strings of the following forms, at least:
.Pp
.Bl -tag -width 1234 -compact
-.It /dev/foo0a
-.It /dev/foo1s2c
+.It /dev/foo1
.It foo0
-.It foo0a
-.It nfoo0
+.It nsa2
.El
.Pp
.Fn cam_get_device
is provided as a convenience function for applications that need to provide
functionality similar to
.Fn cam_open_device .
-Programmers are encouraged to use more deterministic methods of obtaining
-device names and unit numbers if possible.
.Sh RETURN VALUES
.Fn cam_open_device ,
.Fn cam_open_spec_device ,