summaryrefslogtreecommitdiff
path: root/bin/chio
AgeCommit message (Collapse)Author
2015-01-15remove .Tn; from Jan Stary <hans at stare dot cz>Ingo Schwarze
2014-11-20Don't allow embedded nul characters in strings.Jonathan Gray
Fixes a pfctl crash with an anchor name containing an embedded nul found with the afl fuzzer. pfctl parse.y patch from and ok deraadt@
2014-11-16Convert the logic in yyerror(). Instead of creating a temporaryAlexander Bluhm
format string, create a temporary message. OK doug@
2014-11-14Add gcc printf format attributes to yyerror() in parse.y files.Doug Hogan
No yyerror() calls needed to be changed. ok bluhm@
2014-05-18use reallocarrayMarc Espie
okay miod@, millert@
2014-03-16lint is dead (long live the lint!), so stop using it as a cpp conditionalPhilip Guenther
(namespace pollution!) or talking about its opinion on code. ok krw@
2013-11-25use u_char for buffers in yylex, for ctype callsSebastian Benoit
found by millert@, ok deraadt@
2013-11-12add a variety of missing prototypesTheo de Raadt
2013-07-15use .Mt for email address; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2012-12-04remove some unnecessary sys/param.h inclusionsTheo de Raadt
2012-08-15use Lk for links;Jason McIntyre
2011-04-24No point in attempting to open the 'c' partition on devices that haveKenneth R Westerback
no 'c' partition. So don't call opendev(3) with OPENDEV_PART. ok deraadt@
2009-03-31Fixed memory leaks which would occur if the second of two memoryTobias Stoeckmann
allocations fails. looks right deraadt, krw ok henning
2008-02-27Unbreak parser by initializing topfile correctly.Marco Pfatschbacher
I got fooled by patch(1). Sorry.
2008-02-26Have popfile() also close the main config file,Marco Pfatschbacher
but only do the final popfile call after yyparse() is done. This also fixes config reload on SIGHUP for some daemons. Spotted by otto@. OK deraadt@
2007-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-11-12Remove space/tab compression function from lgetc() and replaceMarco Pfatschbacher
it with a simple filter in the yylex() loop. The compression in lgetc() didn't happen for quoted strings, thus creating a regression when tabs were used in variables. Some testing by todd@ and pyr@ OK deraadt@
2007-11-02add man page for chio.conf; missing file spotted by deraadtJason McIntyre
ok beck
2007-10-16sync the synopsis and usage of commandsIgor Sobrado
ok jmc@
2007-10-16Allow '=' to end a number in all lexers.Marco Pfatschbacher
Requested and OK deraadt@
2007-10-16in the lex... even inside quotes, a \ followed by space or tab shouldTheo de Raadt
expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). pointed out by mpf, discussed with pyr
2007-10-13in all these programs using the same pfctl-derived parse.y, re-unify theTheo de Raadt
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
2007-10-11next step in the yylex unification: handle quoted strings in a nicer fashionTheo de Raadt
as found in hoststated, and make all the code diff as clean as possible. a few issues remain mostly surrounding include support, which will likely be added to more of the grammers soon. ok norby pyr, others
2007-09-11macro argument unused, using local instead; spotted by mpfTheo de Raadt
2007-09-11extend lex to spot numbers in the stream, without impacting the parsingTheo de Raadt
of ip addresses and such. this change is being pushed into all the pfctl derived parsers, starting with the easy ones. chio does not yet use the NUMBER token, but may one day. ok krw
2007-06-01fix -Wall 'implicit declaration' of err & errx: s/errno.h/err.h/; ok ↵Constantine A. Murenin
deraadt, henning
2007-05-31convert to new .Dd format;Jason McIntyre
2006-06-14Nuke only two uses of OPENDEV_DRCT in tree. Nuke OPENDEV_DRCT. LongKenneth R Westerback
marked obsolete since the opendev() behaviour it turned on is now the default. 'it can go' deraadt@ 'no API of mine has ever made it into a standard' downsj@
2006-06-13make -avV only be suboptions of the status command, as documented, by usingTheo de Raadt
nested getopt() calls. ok beck
2006-06-03do chio.conf install from right placeTheo de Raadt
2006-06-02Add sample chio.conf to /etcBob Beck
ok deraadt@
2006-06-01fix stupid typo. mea culpaBob Beck
2006-06-01 Move mtio drive prep to a function, and makes the changerBob Beck
check it's notion of access, avoiding problems on more tightly coupled changers if the tape is already ejected - currently these stupid devices return "Initialization Command Required" sense codes but there is (as yet) no way to tell userland that. checking the ACCESS changer flag appears safe in both cases. Adds support for "voltag" type for the source for a move, so you can do "chio move voltag 0003B72 drive 0" to move a tape with the corresponding bar code. Documents the above, as well as status -vVa in the man page. partly from freebsd, man page tweaks by jmc@ ok krw@
2006-05-31prettierTheo de Raadt
2006-05-31 This adds support for retrieving volume tags in chio(8) with theBob Beck
status command and options -v to request the primary volume tag, -V for the alternate volume tag. Man page will follow shortly, along with move support by volume tag.
2006-05-29tweaks;Jason McIntyre
2006-05-29document the st(4) device to chio drive mapping, and the existence ofBob Beck
the /etc/chio.conf file. "You commit, then jmc cleans" deraadt@
2006-05-29oups, left one strdup unchecked, and some more error handling smalliesHenning Brauer
2006-05-29spacingTheo de Raadt
2006-05-29KNFHenning Brauer
2006-05-29de-beckify (KNF)Henning Brauer
2006-05-29Make chio have a connection between st(4) devices and "drives" in aBob Beck
changer - chio will then attempt to open the /dev/rstX device when doing a move from a source of drive X, and will attempt to unload the tape. this avoids issues where pickers madly attempt to grab a busy tape on completely decoupled libraries, or fail to grab an unloaded tape on tightly coupled libraries, the extra unload being harmless if the media has already been ejected. The mapping between st(4) devices and ch drives is by default a simple mapping between picker drive X being mapped to /dev/rstX, however for non-obvious or complicated configurations, we support a /etc/chio.conf file in which the drives for a changer may have their corresponding st(4) devices defined individually. chio will use the default mapping if the /etc/chio.conf file is not present, or does not define a st(4) device for a changer drive. (example chio.conf and man page changes to come) yacc parser for chio.conf written by henning@, ok henning@, krw@
2006-04-25various small lint cleanups; ok ottoTheo de Raadt
2005-11-25BINOWN and BINMODE is not needed hereTheo de Raadt
2005-02-08- rearrange EXAMPLESJared Yanovich
- move env var stuff to ENVIRONMENT - clarify "status" description - sort & simplify commands ok jmc
2003-05-29- section reorderJason McIntyre
- .An/.Aq for AUTHORS
2003-04-28typos;Jason McIntyre
suggestions, corrections and ok millert@
2003-03-12more .LiTheo de Raadt
2002-11-14use $ or # before commands in examplesTheo de Raadt
2002-07-04ansiTheo de Raadt