1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
Commit Graph

86 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
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
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
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
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
deraadt
20ae320826 unsigned char casts where neccessary
ok ratchov
2013-11-20 20:54:34 +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
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
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
deraadt
80cdf6b48a no need to warn about using the default device; Thomas Pfaff 2008-10-29 00:07:07 +00:00
fgsch
7299f7a21f use a bitmap to store the features. simplify the code a bit and allow for
future work.  ok av@ a similar diff.
2008-08-30 10:41:38 +00:00
av
f560e73702 Old drives (reported Giovanni Bechis <bigionews@snb.it>) don't report CD-RW
write feature. Add additional check for media type before blanking.
The patch fixes problem for Giovanni.
ok fgsch
2008-08-13 12:21:19 +00:00
fgsch
3ec8b6274f o use definitions from cd.h
o remove unused function prototype
2008-08-08 07:26:40 +00:00
av
fa3e22b8cc we really need unsigned in arithmetic operations.
comments by fgsch
2008-07-23 21:33:32 +00:00
av
7b34dc5ff0 set speed for writing tracks in TAO.
ok and tweaks by fgsch
manual page by jmc
2008-06-30 23:35:39 +00:00
av
f7dfecd4ed Automatically distinguish between CD-DA track and WAVE audio file writing them
in TAO mode. For WAVE files we should skip header.

ok and comments by fgsch
2008-06-22 21:04:01 +00:00
av
9dfd8015ab move tao code from main() into its own function before adding features.
requested and ok fgsch
2008-06-11 21:59:25 +00:00
av
5c0dfce931 check whether media supports TAO or blanking.
It makes error output nicer, e.g.: "The media can't be written in TAO mode"
instead of "cdio: Only 0 of the required _N_ blocks available"
ok fgsch
2008-06-08 21:40:58 +00:00
av
c7ed604724 Make open_cd() remember open mode. "blank" doesn't have to check for EPERM
anymore.
idea by jakemsr
ok jakemsr ratchov fgsch (with tweaks)
2008-06-06 10:16:52 +00:00
fgsch
fbd1c29904 correct duration by taking the pre-gap into account; ok by many. 2008-05-07 23:27:50 +00:00
mjc
a076f0c490 cdrip and cdplay commands from Alexey Vatchenko
incorporating some manpage suggestions from jmc@
2007-05-26 03:00:03 +00:00
deraadt
9f4c7d8056 spacing 2006-08-25 04:38:32 +00:00
deraadt
60f9290cb3 spacing 2006-08-24 19:35:55 +00:00
deraadt
5a6bb45082 lint cleanup 2006-06-16 17:06:04 +00:00
mjc
e6deffc0da put fd into track's struct so we can fail earlier
'looks good' pat@
2006-06-15 23:49:58 +00:00
deraadt
741934be57 minor cleanup 2006-06-06 23:22:28 +00:00
deraadt
765d0372ec minor tweaks 2006-06-01 07:53:01 +00:00
mjc
dca2c10894 add checks for disc size before we set out trying to burn 4gb
onto an unsuspecting cdr
2006-06-01 07:12:18 +00:00
mjc
cf22b6b503 better command line usage as suggested by deraadt@
ok @deraadt
2006-06-01 06:32:17 +00:00
mjc
7993cded49 add rewritable blanking and track-at-once burning support
ok deraadt@
2006-05-31 01:14:41 +00:00
krw
8bdf91ce3f Clean up command line parsing, don't accept trailing garbage, add in
missing command line forms, zero variables that will not be filled in
by a particular sscanf() call. Make 'play tr1 m1:s1 m2:s2' play from
the point in time 'tr1 m1:s1' to the point in time 'm2:s2', instead of
from 'tr1 m1:s1' for a period of m2:s2. Documenting this command is next.

Closes last issues Juha Erkilla pointed out in PR #4957. Tested by
Juha.
2006-01-20 00:58:32 +00:00
krw
95b6cad4f5 Whitespace nits. 2006-01-11 01:29:07 +00:00
krw
7a498d983d Fix issues with relative times, especially track # vs TOC index
confusion, noted by Juha Erkkila in PR #4957. Make code a lot clearer.
Error out on out of range track numbers.

Tested by Juha.
2006-01-10 19:59:11 +00:00
krw
b8a783ae32 Add cmpmsf(). Use it to eliminate repeated code. No functional change. 2006-01-09 05:48:35 +00:00
krw
3438b82bc3 Bring in toc2msf() from NetBSD's cdplay. Use it to eliminate repeated
code. No functional change.
2006-01-09 04:05:43 +00:00
krw
8dcc894336 Bring in addmsf() from NetBSD's cdplay. Use it to eliminate repeated
manual calculation. No functional change.
2006-01-09 00:20:31 +00:00
krw
43844f6cd3 CDIOCREADTOCENTRYS adjusts lba information into host order, so there
is no need to to ntohl() on it again. CDIOCREADSUBCHANNEL does not
put lba info into host order so just change that to a betoh32().

Noted by Juha Erkkila in PR #4957.

ok pedro@
2005-12-31 19:51:15 +00:00
millert
4464b108b4 Remove an ambiguiity and make 'e' short for "eject". The short form
for "exit" is still "ex".  OK krw@
2005-12-21 15:50:38 +00:00
robert
91b4e8dc4b add an exit command as an alias of quit; ok henning@ 2005-01-22 10:21:26 +00:00
alek
d8a9cdc1f8 Better error message for `device' command without arguments.
help & ok miod@
2005-01-09 11:02:32 +00:00
alek
c934c33362 New shortcuts for commands device (d) and debug (deb)
go ahead espie@
2005-01-08 21:16:02 +00:00