Commit Graph

47 Commits

Author SHA1 Message Date
David Malone
de06a3982c If the user doesn't specify a device and we can't open any of the defaults,
don't print an error using a uninitialised devbuf.
2004-04-01 16:37:46 +00:00
Eivind Eklund
f76c341dd4 * Auto-detect what device to use if none is specified
* Replace references to mcd0 with acd0 (doc only)
* Remove references to the "c" partition (doc only - code was already fixed)
2003-11-17 14:02:04 +00:00
Maxim Konovalov
1672732255 Retire 'c' partition for a CD device.
Submitted by:		Craig Rodrigues <rodrigc@crodrigues.org>
Not objected by:	-current
2003-09-01 12:50:02 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
Eivind Eklund
07796aea23 Fix bug that made cdcontrol play <track> play <track> - 1 2003-03-24 20:54:30 +00:00
Dag-Erling Smørgrav
89f35c14bd The default CD drive is /dev/cd0, not /dev/cd0c.
Reviewed by:	jhb
Approved by:	re (rwatson)
2002-12-03 15:41:30 +00:00
Nate Lawson
76ba4ecdad * Add CDRIOC{READ,WRITE}SPEED ioctls to cd(4). Units are in KB/sec.
* Change atapi-cd ioctls to use the same units.
* Change burncd, cdcontrol to convert CDROM speed to KB/sec before
calling the ioctl.  Add a "max" speed option for their command lines.

This change does not break ABI but does change the units passed through
the ioctl so 3rd party software that uses cdrio.h will have to convert
(most likely by multiplying CDROM speed by 177 to get KB/s).

PR:		kern/36845
Submitted by:	Philipp Mergenthaler <p@i609a.hadiko.de> (CAM ioctls)
Reviewed by:	sos, ken
MFC after:	1 month
2002-10-18 22:03:39 +00:00
Maxim Konovalov
8d9b45ee32 Do not add a start offset time to the track duration time.
Submitted by:	Dmitry Afanasiev, <KOT@MATPOCKuH.SPb.Ru>
MFC after:	2 weeks
2002-09-23 15:00:23 +00:00
Alfred Perlstein
d89167b4ea de-__P() 2002-07-11 18:31:16 +00:00
Maxim Konovalov
7098979e16 style(9): remove an EOF space. 2002-05-08 07:40:22 +00:00
Maxim Konovalov
4a28d4abff Implement 'speed' command: set a maximum read speed. At the moment it
works on ATAPI drives only.

PR:		kern/35512 (a part of)
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
Reviewed by:	-hackers
MFC after:	1 month
2002-05-08 07:32:40 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Mike Heffner
72efeef144 style(9) cleanup: spaces -> tabs.
MFC after:	2 weeks
2001-12-09 19:34:11 +00:00
Mike Heffner
319097faa5 WARNS=2 cleanup.
PR:		bin/32646
MFC after:	2 weeks
2001-12-09 18:40:56 +00:00
David E. O'Brien
757eeda04b *** empty log message *** 2001-10-01 08:43:58 +00:00
Kris Kennaway
4dbed42f75 Add the 'next' and 'prev' commands (aliased to '+' and '-') which skip
forward or backward by a specified number of tracks (defaulting to 1).
Use strvisx() to display the media catalog in case it contains unprintable
characters.  Sort includes.  Based on two patches submitted by PR, plus
style fixes and other changes of my own.

Submitted by:   Seth Kingsley <sethk@osd.bsdi.com>, Maxime Henrion <mux@qualys.com>
PR:             bin/22672, bin/26962
MFC After:      1 week
2001-05-25 09:24:50 +00:00
Josef Karthauser
b074e88895 Don't complain about deprecated environment variables, like MUSIC_CD,
being present in the environment if the user has CDROM defined, or
has specified a device on the command line.

This avoids users of ports like 'workman' that use these variables
getting gratuitous warnings from cdcontrol.

Suggested by:	John Sellens <jsellens@generalconcepts.com>
2001-04-08 21:35:17 +00:00
Josef Karthauser
bb44f0089b Deprecate the use of the CD_DRIVE, CDPLAY, DISC and MUSIC_CD environment
variables in favour of CDROM.

Discussed on:	stable@FreeBSD.org
2001-01-16 20:31:53 +00:00
Dag-Erling Smørgrav
9dd4b5a781 If no device is specified, check the CDROM environment variable before
picking the default device.
2000-12-18 14:35:54 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Josef Karthauser
241f197320 Add a new command, 'cdid', to calculate and display a serial number
for a cd, using the algorithm that the cddb database uses.

Submitted by:	Sergey Shkonda <serg@bcs.zp.ua>
2000-07-13 22:56:43 +00:00
Stephen McKay
faeff70b73 Fix the ^D -> core dump problem properly. ^D == "quit" again. 2000-07-13 12:55:50 +00:00
Mike Smith
49eb60e70f Don't do anything with /dev/rXXX 2000-05-31 01:03:26 +00:00
Josef Karthauser
3712337aef Fixed a potential buffer overflow problem, in the device name handling.
PR:		bin/15101
1999-12-05 20:05:45 +00:00
Ollivier Robert
b5ee3fc069 Stop run() from dereferencing a NULL pointer when you enter a valid command
then a ^D at the prompt.

cdcontrol> play 1 14
cdcontrol>
zsh: 40874 segmentation fault (core dumped)  /usr/sbin/cdcontrol -f /dev/cd1c
1999-11-18 23:04:38 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Matthew N. Dodd
0b2d7c2ffc What the heck was I thinking? Nobody else saw this? Sheesh.
(num > MAX) ? MAX : num

rather than

(MAX > num) ? MAX : num

Also, make things a little easier to read while I'm here.
1999-08-20 01:24:35 +00:00
Matthew N. Dodd
43d79ae9ef Use el_source() so we pick up .editrc 1999-08-19 04:10:33 +00:00
Matthew N. Dodd
1950bb45f3 Add support for command line editing and history.
Remove src/contrib/bind/bin/nslookup/commands.c as it is generated by lex
from commands.l.

Submitted by: lpc/cdcontrol patches originally by msmith.
Reviewed by: msmith (in theory)
1999-08-19 03:29:15 +00:00
Bill Fumerola
787569e61c (1) Make usage() and SYNOPSIS agree with each other.
(2) Use 'device' instead of 'device name', there seems to be a precedent in
    /usr/share/man/man1

Prompted By:	bde
1999-01-31 15:30:21 +00:00
Jean-Marc Zucconi
0d6515cde0 The status command prints the audio position, the media catalog and the
volume value for the disc. It is now possible to specify additional arguments
(audio, volume, media) to print only a subset of the full status.
This is particularly useful with drives which stop playing when asked to
return the catalog number.
1998-01-26 00:57:54 +00:00
Philippe Charnier
dd1f44fc09 Use err(3). Style in usage(). 1997-09-04 11:52:28 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Andrey A. Chernov
72cf78e0b8 Don't print number (garbadge) if media catalog is inactive 1996-06-25 21:01:27 +00:00
Andrey A. Chernov
8fd5ebe3b0 LBA addition to new commands 1996-02-09 01:16:23 +00:00
Andrey A. Chernov
494c6817f8 Integrate vak fixes, mostly command parsing & cosmetic
Submitted by: vak@cronyx.ru
1996-02-09 00:22:17 +00:00
Andrey A. Chernov
219913d08e Print out media catalog number, if exists 1996-02-03 15:21:30 +00:00
Andrey A. Chernov
61c728296d Request/print out media catalog validation info in status command 1996-02-03 15:07:32 +00:00
Andrey A. Chernov
5f0f376b27 Implement several new commands 1996-02-03 14:13:36 +00:00
Andrey A. Chernov
fccbca1d40 Don't mask last track number with end word, better be shure that it is 170 1996-02-02 22:14:39 +00:00
Andrey A. Chernov
aeb13d5b74 Implement 'inject' command 1996-02-02 22:03:37 +00:00
Andrey A. Chernov
3017478d1c Back out my control->addr_type change, need to be fixed in another place 1996-02-02 20:46:46 +00:00
Andrey A. Chernov
b8be555bd4 Fix user input parser, play command even not work in old variant 1996-02-01 19:09:50 +00:00
Andrey A. Chernov
6f4dc255bf Wrong field was used to determine audio/data disks 1996-02-01 17:17:28 +00:00
Andrey A. Chernov
2f3cc4bf87 Use starting track 0 for READTOCENTRYS, should be converted
to real starting track in CD driver.
Old code assume that starting track is always 1.
1996-01-30 12:00:43 +00:00
Jordan K. Hubbard
eae0c0a88b Add the cdcontrol program by Serge Vakulenko. It's my understanding
that this is a superset of cdplay, and perhaps it's time to send cdplay
into the bit bucket if this works well.  According to the docs, it has
a friendlier command structure, command line interface etc.
Submitted by:	Serge Vakulenko <vak@cronyx.ru>
1995-08-18 11:41:32 +00:00