OpenBSD CVS

CVS log for src/bin/chio/parse.y


[BACK] Up to [local] / src / bin / chio

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Fri Oct 15 15:01:27 2021 UTC (2 years, 7 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.23: +12 -12 lines
Diff to previous 1.23 (colored)

Don't declare variables as "unsigned char *" that are passed to
functions that take "char *" arguments.  Where such chars are
assigned to int or passed to ctype functions, explicitly cast them
to unsigned char.

For OpenBSD's clang, -Wpointer-sign has been disabled by default,
but when the parse.y code was built elsewhere, the compiler would
complain.

With help from millert@
ok benno@ deraadt@

Revision 1.23 / (download) - annotate - [select for diffs], Thu Oct 15 19:42:56 2020 UTC (3 years, 7 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.22: +6 -3 lines
Diff to previous 1.22 (colored)

Explicitly skip a leading "/dev/" and do not rely on basename(3) and
non-POSIX basename semantics.
ok millert@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 13 22:57:07 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
ok millert tb benno

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 11 07:39:22 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Do for most running out of memory err() what was done for most running
out of memory log_warn(). i.e. ("%s", __func__) instead of manual
function names and redundant verbiage about which wrapper detected the
out of memory condition.

ok henning@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Nov 20 05:51:20 2014 UTC (9 years, 6 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

Don't allow embedded nul characters in strings.
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@

Revision 1.19 / (download) - annotate - [select for diffs], Sun Nov 16 19:07:50 2014 UTC (9 years, 6 months ago) by bluhm
Branch: MAIN
Changes since 1.18: +6 -6 lines
Diff to previous 1.18 (colored)

Convert the logic in yyerror().  Instead of creating a temporary
format string, create a temporary message.
OK doug@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Nov 14 03:20:36 2014 UTC (9 years, 6 months ago) by doug
Branch: MAIN
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored)

Add gcc printf format attributes to yyerror() in parse.y files.
No yyerror() calls needed to be changed.

ok bluhm@

Revision 1.17 / (download) - annotate - [select for diffs], Sun May 18 16:36:41 2014 UTC (10 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

use reallocarray
okay miod@, millert@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Nov 25 12:51:10 2013 UTC (10 years, 6 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.15: +6 -6 lines
Diff to previous 1.15 (colored)

use u_char for buffers in yylex, for ctype calls
found by millert@, ok deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Nov 12 04:36:01 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored)

add a variety of missing prototypes

Revision 1.14 / (download) - annotate - [select for diffs], Tue Mar 31 21:03:48 2009 UTC (15 years, 2 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.13: +6 -3 lines
Diff to previous 1.13 (colored)

Fixed memory leaks which would occur if the second of two memory
allocations fails.

looks right deraadt, krw
ok henning

Revision 1.13 / (download) - annotate - [select for diffs], Wed Feb 27 16:07:20 2008 UTC (16 years, 3 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Unbreak parser by initializing topfile correctly.
I got fooled by patch(1). Sorry.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Feb 26 10:09:58 2008 UTC (16 years, 3 months ago) by mpf
Branch: MAIN
Changes since 1.11: +15 -14 lines
Diff to previous 1.11 (colored)

Have popfile() also close the main config file,
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@

Revision 1.11 / (download) - annotate - [select for diffs], Mon Nov 12 23:59:40 2007 UTC (16 years, 7 months ago) by mpf
Branch: MAIN
Changes since 1.10: +2 -10 lines
Diff to previous 1.10 (colored)

Remove space/tab compression function from lgetc() and replace
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@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Oct 16 20:01:23 2007 UTC (16 years, 7 months ago) by mpf
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Allow '=' to end a number in all lexers.
Requested and OK deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Oct 16 06:06:47 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +4 -2 lines
Diff to previous 1.8 (colored)

in the lex... even inside quotes, a \ followed by space or tab should
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

Revision 1.8 / (download) - annotate - [select for diffs], Sat Oct 13 16:35:16 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +97 -49 lines
Diff to previous 1.7 (colored)

in all these programs using the same pfctl-derived parse.y, re-unify the
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.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 11 14:39:15 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +26 -14 lines
Diff to previous 1.6 (colored)

next step in the yylex unification: handle quoted strings in a nicer fashion
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

Revision 1.6 / (download) - annotate - [select for diffs], Tue Sep 11 23:06:37 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

macro argument unused, using local instead; spotted by mpf

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 11 22:16:15 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +39 -2 lines
Diff to previous 1.4 (colored)

extend lex to spot numbers in the stream, without impacting the parsing
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

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 1 06:48:34 2007 UTC (17 years ago) by cnst
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

fix -Wall 'implicit declaration' of err & errx: s/errno.h/err.h/;  ok deraadt, henning

Revision 1.3 / (download) - annotate - [select for diffs], Mon May 29 01:41:27 2006 UTC (18 years ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

oups, left one strdup unchecked, and some more error handling smallies

Revision 1.2 / (download) - annotate - [select for diffs], Mon May 29 01:34:36 2006 UTC (18 years ago) by henning
Branch: MAIN
Changes since 1.1: +5 -7 lines
Diff to previous 1.1 (colored)

de-beckify (KNF)

Revision 1.1 / (download) - annotate - [select for diffs], Mon May 29 01:21:38 2006 UTC (18 years ago) by beck
Branch: MAIN

Make chio have a connection between st(4) devices and "drives" in a
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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.