summaryrefslogtreecommitdiffstats
path: root/lib/libcam
Commit message (Collapse)AuthorAgeFilesLines
* This is an overhaul of the mode page handling in camcontrol as well askbyanc2000-08-082-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related patches. These include: * Mode page editting can be scripted. This involves two things: first, if stdin is not a tty, changes are read from stdin rather than invoking $EDITOR. Second, and more importantly, not all modepage entries must be included in the change set. This means that camcontrol can now gracefully handle more intrusive editting from the $EDITOR, including removal or rearrangement of lines. It also means that you can do stuff like: # echo "WCE: 1" | camcontrol modepage da3 -m 8 -e # newfs /dev/da3 # echo "WCE: 0" | camcontrol modepage da3 -m 8 -e * Range-checking on user-supplied input values. modeedit.c now uses the field width specifiers to determine the maximum allowable value for a field. If the user enters a value larger than the maximum, it clips the value to the max and warns the user. This also involved patching cam_cmdparse.c to be more consistent with regards to the "count" parameter to arg_put (previously is was the length of strings and 1 for all integral types). The cam_cdbparse(3) man page was also updated to reflect the revised semantics. * In the process, I removed the 64 entry limit on mode pages (not that we were even close to hitting that limit). This was a nice side-effect of the other changes. * Technically, the new mode editting functionality allows editting of character array entries in mode pages (type 'c' or 'z'), however since buff_encode doesn't grok them it is currently useless. * Camcontrol gained two new options related to mode pages: -l and -b. The former lists all available mode pages for a given device. The latter forces mode page display in binary format (the default when no mode page definition was found in scsi_modes). * Added support for mode page names to scsi_modes. Allows names to be displayed alongside mode numbers in the mode page listing. Updated scsi_modes to use the new functionality. This also adds the semicolon into the scsi_modes syntax as an optional mode page definition terminator. This is needed to name pages without providing a page format definition. * Updated scsi_all.h to include a structure describing mode page headers. * Added $FreeBSD$ line to scsi_modes. Inspired by: dwhite Reviewed by: ken
* Fix groff confusion for PS output.alex2000-06-201-3/+1
| | | | | PR: 14532 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
* Implement a new camcontrol function, 'camcontrol format'.ken2000-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libcam/Makefile: Add scsi_da.c to libcam for the new scsi_format_unit() function. camcontrol.8: Update the man page for the new format functionality, and take out the examples section describing how to do it with 'camcontrol cmd'. camcontrol.c: New format functionality. Note that unlike the rest of the camcontrol subcommands, this one is interactive by default. Because of the potential destructiveness of the format command, I thought it necessary to get confirmation from the user before spamming a disk. You can disable the interactive behavior, and the status meter with command line arguments. scsi_da.c: Add the new scsi_format_unit() cdb building function and use #ifdef _KERNEL to make this file compile in both the kernel and userland. The format unit function is currently only defined in the non-kernel case, because nothing in the kernel is using it. If that changes, it should be un-ifdefed and compiled in both cases. scsi_da.h: New function declaration, CDB structure and format data structures. Thanks to Nick Hibma for providing some valuable input on these changes.
* Introduce .Lb macro to libcam manpages.phantom2000-04-222-0/+4
|
* Specify the system directory for which we put in our include pathmjacob2000-01-211-1/+2
| | | | | as a separate line so we can override it on the command line if we need to.
* get pd_type from inquiry data itselfmjacob2000-01-161-1/+1
|
* Replace beforeinstall target with new variables used by .mk system.rgrimes2000-01-141-4/+3
| | | | Reviewed by: marcel, and make world
* Fix a file descriptor leak in cam_open_btl(). The xpt device was opened,ken1999-09-121-1/+5
| | | | | | but never closed. Submitted by: amobbs@allstor-sw.co.uk
* $Id$ -> $FreeBSD$peter1999-08-285-5/+5
|
* Take out a reference to ccb(4). I never got around to writing it.ken1999-08-171-3/+2
| | | | Reported by: "Alexey M. Zelkin" <phantom@cris.net>
* Various man page cleanup:mpp1999-08-151-3/+3
| | | | | | | | | | - Sort xrefs - FreeBSD.ORG -> FreeBSD.org - Be consistent with section names as outlines in mdoc(7) - Other misc mdoc cleanup. PR: doc/13144 Submitted by: Alexy M. Zelkin <phantom@cris.net>
* Add a MAINTAINER line to modules that I maintain.ken1999-06-181-0/+1
| | | | Suggested by: brian, markm
* cam_get_device() was returning 0 on failure, and 1 on success, whilempp1999-06-151-10/+10
| | | | | | | | camcontrol(8) and the documentation in camlib.c and cam(3) all expect -1 on failure and 0 on success. Updated camlib.c to return the values specified by the documentation. PR: 12023
* Fixed missing header in synopsis (<camlib.h> includes half the universebde1999-03-052-2/+4
| | | | but not <stdio.h>).
* Use snprintf to make sure we don't overflow a buffer.ken1998-11-151-4/+5
|
* Fix an error message. (it was using an uninitialized variable)ken1998-11-151-2/+2
| | | | Reported by: dan@math.berkeley.edu (Dan Strick)
* Add man pages for many of the functions in the CAM library. This coversken1998-10-143-33/+983
| | | | | | | | | | | most of the open/close routines, and the buffer/cdb parsing routines derived from the old scsi(3) library. The cam_cdbparse(3) man page borrows from the old scsi(3) man page, so the copyright and history section reflect that. The many scsi_* functions and other functions that are pulled in from the kernel aren't documented yet, but will be eventually.
* Add a "dummy light" (actually two dummy lights) to catch people who don'tken1998-10-121-4/+27
| | | | | | | | | have the passthrough device configured in their kernel. This will hopefully reduce the number of people complaining that they can't get {camcontrol, xmcd, tosha, cdrecord, etc.} to work. Reviewed by: gibbs
* Remove scsi_da.c from the list of things compiled into the CAM library.ken1998-09-181-1/+1
| | | | | | | | | | | | | | The functions that were being compiled into the library have been moved to scsi_all.c. One warning: Any programs using scsi_start_stop() or scsi_read_write() that included scsi_da.h but not scsi_all.h will need to be changed to include scsi_all.h. This doesn't affect camcontrol, and I don't think it affects any ports, but you never know. PR: kern/7969 Reviewed by: gibbs
* Fix some Alpha portability problems, and add some belt-and-suspendersken1998-09-161-9/+44
| | | | | | | checking in some functions. Submitted by: dfr Modified by: ken
* I hate late night commits. These should be nuked from the atticy bygibbs1998-09-154-0/+0
| | | | the CVS meister.
* CAM userland utility library, a replacement for libscsi.gibbs1998-09-158-0/+1774
Submitted by: "Kenneth D. Merry" <ken@FreeBSD.org>
OpenPOWER on IntegriCloud