History log of /freebsd-10.1-release/usr.sbin/cdcontrol/cdcontrol.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 227225 06-Nov-2011 ed

Make all functions and global variables static for cdcontrol(8).

While there, replace __const by const, which seems to be our preference
nowadays. Also fix some style(9) bugs by adding newlines and removing
unneeded spaces from function declarations.


# 201608 05-Jan-2010 dwmalone

New style function definitions.
Fix constness problem - don't know that pstatus won't change a string with no
whitespace.


# 197833 07-Oct-2009 jh

When run() returns an error, print the error message also in
non-interactive mode. Previously error messages were printed only in
interactive mode.

PR: bin/124517
Approved by: trasz (mentor)
MFC after: 1 month


# 180507 14-Jul-2008 gahr

- Enhance volume handling

PR: 125054
Submitted by: gahr
Approved by: cperciva


# 176407 19-Feb-2008 ru

getopt(3) returns -1, not EOF.


# 151471 19-Oct-2005 stefanf

Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR: 86355


# 127714 01-Apr-2004 dwmalone

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.


# 122855 17-Nov-2003 eivind

* 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)


# 119653 01-Sep-2003 maxim

Retire 'c' partition for a CD device.

Submitted by: Craig Rodrigues <rodrigc@crodrigues.org>
Not objected by: -current


# 114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


# 112559 24-Mar-2003 eivind

Fix bug that made cdcontrol play <track> play <track> - 1


# 107552 03-Dec-2002 des

The default CD drive is /dev/cd0, not /dev/cd0c.

Reviewed by: jhb
Approved by: re (rwatson)


# 105421 18-Oct-2002 njl

* 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


# 103861 23-Sep-2002 maxim

Do not add a start offset time to the track duration time.

Submitted by: Dmitry Afanasiev, <KOT@MATPOCKuH.SPb.Ru>
MFC after: 2 weeks


# 99800 11-Jul-2002 alfred

de-__P()


# 96214 08-May-2002 maxim

style(9): remove an EOF space.


# 96213 08-May-2002 maxim

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


# 90868 18-Feb-2002 mike

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


# 87573 09-Dec-2001 mikeh

style(9) cleanup: spaces -> tabs.

MFC after: 2 weeks


# 87568 09-Dec-2001 mikeh

WARNS=2 cleanup.

PR: bin/32646
MFC after: 2 weeks


# 84262 01-Oct-2001 obrien

Adjust to the libedit enhancements some functions now take more parameters.

Partially submitted by: kris


# 84261 01-Oct-2001 obrien

*** empty log message ***


# 77168 25-May-2001 kris

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


# 75324 08-Apr-2001 joe

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>


# 71122 16-Jan-2001 joe

Deprecate the use of the CD_DRIVE, CDPLAY, DISC and MUSIC_CD environment
variables in favour of CDROM.

Discussed on: stable@FreeBSD.org


# 70149 18-Dec-2000 des

If no device is specified, check the CDROM environment variable before
picking the default device.


# 69793 09-Dec-2000 obrien

Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.


# 63091 13-Jul-2000 joe

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>


# 63070 13-Jul-2000 mckay

Fix the ^D -> core dump problem properly. ^D == "quit" again.


# 61105 30-May-2000 msmith

Don't do anything with /dev/rXXX


# 54164 05-Dec-1999 joe

Fixed a potential buffer overflow problem, in the device name handling.

PR: bin/15101


# 53387 18-Nov-1999 roberto

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


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 50071 19-Aug-1999 mdodd

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.


# 50042 19-Aug-1999 mdodd

Use el_source() so we pick up .editrc


# 50039 19-Aug-1999 mdodd

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)


# 43479 31-Jan-1999 billf

(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


# 32782 25-Jan-1998 jmz

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.


# 29103 04-Sep-1997 charnier

Use err(3). Style in usage().


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

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.


# 16736 25-Jun-1996 ache

Don't print number (garbadge) if media catalog is inactive


# 13989 08-Feb-1996 ache

LBA addition to new commands


# 13985 08-Feb-1996 ache

Integrate vak fixes, mostly command parsing & cosmetic
Submitted by: vak@cronyx.ru


# 13889 03-Feb-1996 ache

Print out media catalog number, if exists


# 13888 03-Feb-1996 ache

Request/print out media catalog validation info in status command


# 13884 03-Feb-1996 ache

Implement several new commands


# 13867 02-Feb-1996 ache

Don't mask last track number with end word, better be shure that it is 170


# 13865 02-Feb-1996 ache

Implement 'inject' command


# 13861 02-Feb-1996 ache

Back out my control->addr_type change, need to be fixed in another place


# 13832 01-Feb-1996 ache

Fix user input parser, play command even not work in old variant


# 13823 01-Feb-1996 ache

Wrong field was used to determine audio/data disks


# 13737 30-Jan-1996 ache

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.


# 10099 18-Aug-1995 jkh

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>