1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-09 22:38:01 -08:00
Commit Graph

188 Commits

Author SHA1 Message Date
guenther
5b133f3f27 Delete obsolete /* ARGSUSED */ lint comments.
ok miod@ millert@
2023-03-08 04:43:04 +00:00
kn
881f6c5ff0 Denote multiple arguments with 'arg ...' not 'args'
A few programs used the plural in their synopsis which doesn't read as
clear as the obvious triple-dot notation.

mdoc(7) .Ar defaults to "file ..." if no arguments are given and consistent
use of 'arg ...' matches that behaviour.

Cleanup a few markups of the same argument so the text keeps reading
naturally;  omit unhelpful parts like 'if optional arguments are given,
they are passed along' for tools like time(1) and timeout(1) that obviously
execute commands with whatever arguments where given -- just like doas(1)
which doesn't mention arguments in its DESCRIPTION in the first place.

For expr(1) the difference between 'expressions' and 'expression ...' is
crucial, as arguments must be passed as individual words.

Feedback millert jmc schwarze deraadt
OK jmc
2022-12-22 19:53:22 +00:00
krw
0a3fb11d8f Vox populi says "cdio:" prefix is useful so switch back to using
warnx(), but with required "\n" manually output to stderr before
calling warnx().

Requested by tb@ and OP Michael Siegel.
2022-10-11 16:32:40 +00:00
krw
6e8568b906 Use warnx(), not warn(), when 'errno' is not relevant. 2022-10-10 15:04:09 +00:00
krw
80203c1b92 Don't leak 'sec' in error path. 2022-10-10 14:52:02 +00:00
krw
5cb1d9dce1 Fix some error output, replacing some silly 'warnx("\n...")' with
fprintf(stderr, "\n...").

Reported by Michael Siegel via bugs@. ok tb@ (with some further suggestions)
2022-10-07 19:59:19 +00:00
naddy
41ce3b17e7 man pages: add missing commas between subordinate and main clauses
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.

ok jmc@
2022-03-31 17:27:13 +00:00
jsg
2052624ca4 unifdef CDIOCCLOSE __OpenBSD__ 2022-02-15 08:17:50 +00:00
deraadt
1a0afcde32 Stop using MAXBSIZE to eliminate sys/param.h including (which injects a
ton of namespace intrusion).  Create local sizes, and refactor some code
along the way.
ok millert
2021-11-28 19:28:41 +00:00
deraadt
b7041c0781 For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant.  Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk.  They could all be 0xdeafbeef.
ok millert
2021-10-24 21:24:15 +00:00
schwarze
a93de8ed3a During line editing, let Ctrl-C discard the current input line and
provide a fresh prompt instead of exiting the program.  This aligns
behaviour with bc(1), ftp(1), sftp(1), and all the shells.

OK naddy@

Both martijn@ and naddy@ point out that this program might profit
from signal handling during more of its code, but that would require
more code inspection, design work, and testing which i'm not planning
to do right now.  Consider standard behaviour during line editing
as a first step.
2021-08-13 10:56:54 +00:00
mortimer
c52ec6b035 Extern tracks list to avoid linker issues with -fno-common.
ok deraadt@
2021-01-18 00:44:00 +00:00
krw
b9a0c77e59 Missed WRITE_BIG -> WRITE_10 2020-09-01 17:20:02 +00:00
naddy
143054fa78 Switch cdio's default CDDB database to gnudb.gnudb.org:8880.
The freedb.org CD track database has been discontinued.

Retire cddb/888 from /etc/services.  Nothing uses this any longer.
gnudb.org uses the "cddbp-alt" port of 8880, but we don't need a
services(5) entry for a single site.

ok deraadt@
2020-06-26 19:51:14 +00:00
jmc
627ebc33bf sort SEE ALSO; 2020-04-22 05:37:00 +00:00
deraadt
596a878a59 move mixerctl and audioctl man pages to section 8, as these work
against root-only device nodes.
2020-04-21 21:32:26 +00:00
ratchov
791a5c25a2 Remove references to "aucat socket".
The "aucat socket" was removed ~7 years ago. As the output could be
anything on the network, also drop the .Xr to audio(4).

ok sthen jmc
2019-10-02 07:43:20 +00:00
deraadt
515e489c3d snprintf/vsnprintf return < 0 on error, rather than -1. 2019-07-03 03:24:01 +00:00
deraadt
3aaa63eb46 When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
2019-06-28 13:34:58 +00:00
naddy
2ccade874a Change a strange "} if" into the intended "} else if". No practial
difference in this instance.  ok krw@
2019-04-01 03:57:07 +00:00
guenther
f414793931 Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@
2018-04-26 12:42:50 +00:00
cheloha
5eb87a29ca Use the monotonic clock for logging progress in cdio(1) and ftp(1).
Keeps the progress log from blipping or stalling if, e.g., the
system time is changed in the midst of a rip or a transfer.

ok tb@ jca@
2017-12-23 20:04:23 +00:00
krw
1c866f68ca Let it compile again. 2017-12-07 02:08:44 +00:00
espie
b356b55ad8 be consistent in where we call fflush
okay millert@
2017-12-06 17:15:43 +00:00
jmc
bc20e4327c expand TAO in the correct place; from michael reed
this commit differs a little from the diff michael posted:

- i've uppercased the expansion, which seems a better fit
- reworked a later description to fit
2017-03-19 18:40:11 +00:00
deraadt
cfff592fdc Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert
2015-08-20 22:32:41 +00:00
bentley
9dbd696514 Reduce usage of predefined strings in manpages.
Predefined strings are not very portable across troff implementations,
and they make the source much harder to read. Usually the intended
character can be written directly.

No output changes, except for two instances where the incorrect escape
was used in the first place.

tweaks + ok schwarze@
2015-02-28 21:51:56 +00:00
deraadt
b9fc9a728f Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
2015-01-16 06:39:28 +00:00
doug
abcbcc4d80 Replace all queue *_END macro calls except CIRCLEQ_END with NULL.
CIRCLEQ_* is deprecated and not called in the tree.  The other queue types
have *_END macros which were added for symmetry with CIRCLEQ_END.  They are
defined as NULL.  There's no reason to keep the other *_END macro calls.

ok millert@
2014-09-13 16:06:36 +00:00
schwarze
27e959701b obvious cases of missing .An;
found with the new mandoc(1) MANDOCERR_AN_MISSING warning;
no text changes
2014-09-08 01:27:54 +00:00
espie
98f738e746 fgetln may return incomplete lines (Tobias Stoeckmann <tobias@stoeckmann.org>)
simple solution: error out. This is not a correct cddb answer anyways.
2014-01-06 12:38:10 +00:00
tobias
61dbd8aa4e Properly validate index value received from CDDB server.
ok deraadt@, millert@
2014-01-04 15:39:17 +00:00
deraadt
20ae320826 unsigned char casts where neccessary
ok ratchov
2013-11-20 20:54:34 +00:00
deraadt
3af8cbcb29 bring prototypes into scope 2013-11-12 17:57:34 +00:00
espie
c14b1d516c fix atrocious code, do socket -> FILE* conversion correctly, with proper
error handling.

okay millert@, otto@
2013-03-07 16:54:28 +00:00
stsp
72005a6214 Document default write speed of tao subcommand. 2011-07-09 18:10:24 +00:00
tedu
eb68ddbbaf no mcd 2011-06-26 23:45:26 +00:00
miod
691235adb9 Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'
for chars.
2011-04-06 11:36:23 +00:00
jmc
e62f24032a more wacky macro fixing; 2010-09-19 21:30:04 +00:00
jmc
f14a1b4ca8 - fix a spacing issue in SYNOPSIS
- occurence -> occurrence
2010-07-26 21:14:39 +00:00
krw
dc4cd921ad Add printing of current profile and feature information to 'info'
command with -v. Make a second -v cause printing of raw feature
data and a full list of profiles. A few minor tweaks to the feature
bitmap handling. Helps in debugging media problems in cdio.

Suggestions from fgsch@, man page fixes from jmc@ as usual.

ok beck@ deraadt@
2010-03-01 02:09:44 +00:00
claudio
475b093775 Do not write 16bit values directly to odd addresses - strict alignment
architectures don't like that. Makes cd blanking on sparc64 possible.
OK deraadt@, krw@, jasper@
2009-12-04 07:43:26 +00:00
jmc
74fdbf9dc8 try to get "play" right; help/ok naddy 2009-06-09 22:20:44 +00:00
naddy
c4c97271b4 Synchronize man page and help output.
From a least of details by sobrado@; input by jmc@ who still isn't happy.
2009-06-03 00:45:59 +00:00
ratchov
3bcf870de4 Explain the AUDIODEVICE env. variable similarly to how sio_open(3) does.
discussed with jmc@
2009-04-10 18:51:44 +00:00
ratchov
51e3cd065f don't use the AUDIODEVICE env. variable because sio_open(3) already
does it. From Anathae Townsend <atownsend(at)nucleus.com>, thanks!
2009-04-10 18:19:41 +00:00
naddy
a248831fca Restore the original help output: capitalize the characters that
are required to uniquely identify a command.
Three characters are required for the cdplay and cdrip commands.
ok krw@
2009-02-07 20:21:13 +00:00
ratchov
09aec2233a set the buffer size using the ``appbufsz'' parameter of
sio_setpar(3). Allows cdio to be used with aucat(1) whatever
the buffer size used by aucat is.
ok jakemsr
2008-12-28 15:48:32 +00:00
jakemsr
c6db944c23 don't try to sio_close a NULL sio_hdl. stops cdio from segfaulting
when /dev/audio is busy or AUDIODEVICE is not set correctly.

commit it!  ratchov@
2008-12-11 10:59:49 +00:00
jakemsr
4a68a64c90 sndio for cdio (only for the "cdplay" command)
with a hint from ratchov@

ok av@
2008-11-29 08:57:10 +00:00