aboutsummaryrefslogtreecommitdiff
path: root/bin/chio
Commit message (Collapse)AuthorAgeFilesLines
* chio: Add SPDX-License-Identifier tagsTuukka Pasanen2026-02-093-0/+6
| | | | | | | | | Some BSD-4-Clause files under bin/chio were missing the SPDX-License-Identifier-tag. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55193
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* chio(8): Fix typo in the copyright sectionWilbert Allen Koeswoyo Suwito2024-02-131-1/+1
| | | | | Event: Advanced UNIX Programming Course (Fall’23) at NTHU. Pull Request: https://github.com/freebsd/freebsd-src/pull/978
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-8/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* bin: Remove ancient SCCS tags.Warner Losh2023-11-271-1/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-162-2/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* chio: Mark some arguments as unused.Warner Losh2022-10-251-2/+2
| | | | Sponsored by: Netflix
* pkgbase: Put chio in utilitiesEmmanuel Vadot2021-06-191-1/+1
| | | | | | | No need to bloat runtime with this utility. Differential Revision: https://reviews.freebsd.org/D30753 Sponsored by: Diablotin Systems
* chio: avoid out of bounds readEd Maste2020-07-261-1/+1
| | | | | | | | | | | ch_ces is alloacated with space for total_elem entries. CID: 1418536 Reported by: Coverity Scan Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=363563
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Document where chio(1) originated from & which version of FreeBSD first ↵Sevan Janiyan2016-10-051-1/+9
| | | | | | | | | | | | included it. PR: 211776 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Notes: svn path=/head/; revision=306714
* Move the description of CHANGER variable to ENVIRONMENT section rather than ↵Sevan Janiyan2016-10-021-5/+7
| | | | | | | | | | | | | | | in the DESCRIPTION section. From OpenBSD src/bin/chio/chio.1 r1.23 PR: 212158 Approved by: bjk Obtained from: OpenBSD MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8117 Notes: svn path=/head/; revision=306584
* Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-02-091-0/+1
| | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge head from 7/28Simon J. Gerraty2014-08-191-7/+3
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=270164
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Merge from headSimon J. Gerraty2013-09-051-0/+70
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | use .Mt to mark up email addresses consistently (part1)Baptiste Daroussin2014-06-201-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267667
* | | mdoc: remove superfluous paragraph macros.Joel Dahl2014-06-151-2/+0
| |/ |/| | | | | Notes: svn path=/head/; revision=267505
* | Update chio(1) and ch(4) to support reporting element designators.Kenneth D. Merry2013-04-191-0/+70
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows mapping a tape drive in a changer (as reported by 'chio status') to a sa(4) driver instance by comparing the serial numbers. The designators can be ASCII (which is printed out directly), binary (which is printed in hex format) or UTF-8, which is printed in either native UTF-8 format if the terminal can support it, or in %XX notation for non-ASCII characters. Thanks to Hiroki Sato <hrs@> for the explaining UTF-8 printing and example UTF-8 printing code. chio.h: Modify the changer_element_status structure to add new fields and definitions from the SMC3r16 spec. Rename the original CHIOGSTATUS ioctl to OCHIOGTATUS and define a new CHIOGSTATUS ioctl. Clean up some tab/space issues. chio.c: For the 'status' subcommand, print the designator field if it is supplied by a device. scsi_ch.h: Add new flags for DVCID and CURDATA to the READ ELEMENT STATUS command structure. Add a read_element_status_device_id structure for the data fields in the new standard. Add new unions, dt_or_obsolete and voltage_devid, to hold and address data from either SCSI-2 or newer devices. scsi_ch.c: Implement support for fetching device IDs with READ ELEMENT STATUS data. Add new arguments to scsi_read_element_status() to allow the user to request the DVCID and CURDATA bits. This isn't compiled into libcam (it's only an internal kernel interface), so we don't need any special handling for the API change. If the user issues the new CHIOGSTATUS ioctl, copy all of the available element status data out. If he issues the OCHIOGSTATUS ioctl, we don't copy the new fields in the structure. Fix a bug in chopen() that would result in the peripheral never getting unheld if chgetparams() failed. Sponsored by: Spectra Logic Submitted by: Po-Li Soong MFC After: 1 week Notes: svn path=/head/; revision=249658
* Add static keywords to chio(1).Ed Schouten2011-12-111-3/+3
| | | | | | | | All other global variables are already marked static, so for consistency sake, add them to these three arrays as well. Notes: svn path=/head/; revision=228423
* Zero struct before reading from itUlrich Spörlein2010-06-021-0/+1
| | | | | | | | | PR: 140384 Found by: clang static analyzer MFC after: 3 weeks Notes: svn path=/head/; revision=208730
* When running a "chio return" operation using a physical source unitJoerg Wunsch2008-10-301-4/+6
| | | | | | | | | | | | | | | rather than a voltag name, do not set the CESR_VOLTAGS flags in the CHIOGSTATUS command requesting the current status. As voltags are an optional feature that must be handled as "reserved" by media changers not implementing the feature, always setting CESR_VOLTAGS resulted in the command being aborted with an `Invalid field in CDB', and consequently the "chio return" failed, for media changers that do not support voltags. MFC after: 1 week Notes: svn path=/head/; revision=184484
* Don't specify SRCS= when it can be obtained from PROGS=Xin LI2005-01-271-1/+0
| | | | Notes: svn path=/head/; revision=140902
* Add the new standard EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-161-5/+5
| | | | | | | Sort standard sections in the (documented) preferred order. Notes: svn path=/head/; revision=140353
* Removed harmful empty lines that crept in during the copyrightRuslan Ermilov2005-01-131-1/+0
| | | | | | | header update. Notes: svn path=/head/; revision=140169
* /*- or .\"- or #- to begin license clauses.Warner Losh2005-01-104-4/+5
| | | | Notes: svn path=/head/; revision=139969
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-12/+24
| | | | Notes: svn path=/head/; revision=131484
* Quiet warnings about copyright[].David E. O'Brien2003-05-011-0/+2
| | | | Notes: svn path=/head/; revision=114433
* The .Nm utilityPhilippe Charnier2003-03-241-2/+3
| | | | Notes: svn path=/head/; revision=112544
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-011-1/+1
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Remove double #include <sys/cdef.h> and __FBSDID.David Malone2002-07-011-2/+0
| | | | | | | | PR: 40053 Submitted by: Dan Lukes <dan@obluda.cz> Notes: svn path=/head/; revision=99205
* Consistently use __FBSDIDDavid E. O'Brien2002-06-301-0/+2
| | | | Notes: svn path=/head/; revision=99109
* Replace use of __progname with the functionally identical and moreMark Murray2002-03-241-15/+14
| | | | | | | acceptable getprogname(3). Notes: svn path=/head/; revision=93101
* Use ANSI-99 int names (uintXX_t) over traditional BSD int namesWarner Losh2002-03-051-5/+6
| | | | | | | (u_intXX_t). Notes: svn path=/head/; revision=91665
* Fix a boatload of warnings inspired by lint, a commercial lintMark Murray2002-02-221-16/+14
| | | | | | | and WARNS=4. Notes: svn path=/head/; revision=91086
* Modernization effort for bin/c*:Warner Losh2002-02-022-89/+45
| | | | | | | | | | | | | | | o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Approved by: arch@, new style(9) Notes: svn path=/head/; revision=90107
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyDavid E. O'Brien2001-12-041-1/+0
| | | | | | | | | set WARNS=0. Reviewed by: mike Notes: svn path=/head/; revision=87323
* mdoc(7) police: join split punctuation to macro calls.Ruslan Ermilov2001-08-101-2/+1
| | | | Notes: svn path=/head/; revision=81462
* Remove whitespace at EOL.Dima Dorfman2001-07-151-1/+1
| | | | Notes: svn path=/head/; revision=79754