History log of /freebsd-9.3-release/usr.sbin/burncd/burncd.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

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

# 226800 26-Oct-2011 rodrigc

Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined. This sysctl can be queried by feature_present(3).

Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out. These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver. By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's. For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.

In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.

PR: 160979
Reviewed by: jh, Arnaud Lacombe <lacombar at gmail dot com>
Approved by: re (kib)
Reported by: Joe Barbish <fbsd8 at a1poweruser dot com>


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 202709 20-Jan-2010 delphij

Give the right value when complaining it being wrong.

Reported by: danfe
MFC after: 3 days


# 200795 21-Dec-2009 delphij

Add support of using environment variable BURNCD_SPEED to specify
recodring speed.

PR: bin/140530
Submitted by: Alexander Best <alexbestms wwu.de>
MFC after: 1 month


# 186784 05-Jan-2009 obrien

Correct the type for the global var accessed in sig handlers.


# 186444 23-Dec-2008 obrien

Make signal handler safer.

Submitted by: Jaakko Heinonen <jh@saunalahti.fi>


# 186337 19-Dec-2008 obrien

burncd(8) doesn't handle signals and interrupting burncd during operation.
For example, ^C (SIGINT) may leave the drive spinning and locked.
This may also happen if you try to write a too-large image to a disc
and burncd(8) exits with an I/O error.

Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave
burner in a sane state when burning is interrupted with SIGHUP, SIGINT,
SIGTERM, or in case an I/O error occurs during write.
Note, that blanking will still continue after interrupt but it seems to
finish correctly even after burncd(8) has quit.

Also, while I'm here bump WARNS to "6".

PR: 48730
Submitted by: Jaakko Heinonen <jh@saunalahti.fi>


# 146195 13-May-2005 ru

Fix the "only wrote -1 of 32768 bytes: Input/output error" error message.


# 139129 21-Dec-2004 ru

Document -F in usage() and SYNOPSIS.


# 139128 21-Dec-2004 ru

Make "burncd ... fixate eject" really work as promised.


# 138973 17-Dec-2004 ru

err() -> errx()


# 135273 15-Sep-2004 des

My fingers keep typing 'burncd data foo fixate eject' instead of 'burncd -e
data foo fixate'. Humor them.

MFC after: 4 weeks


# 135271 15-Sep-2004 des

Mechanical whitespace cleanup.


# 126643 05-Mar-2004 markm

Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64


# 123937 28-Dec-2003 alfred

Use intmax_t to avoid wrap on large images in verbose output.


# 118055 26-Jul-2003 pb

Fix "write from stdin".

Reviewed by: sos
MFC after: 1 week


# 114661 04-May-2003 sos

Add support for using the CDROM env var for device to use;

PR: 38178


# 114660 04-May-2003 sos

Fix filename printing when using -l option.
PR: 43574


# 114659 04-May-2003 sos

Dont fixate when doing dvdrw or test writing.

PR: 47195


# 108444 30-Dec-2002 obrien

Make fully WARNS=5 clean.

Tested on: sparc64, x86


# 108416 29-Dec-2002 wollman

Fix printf format errors on 64-bit platforms and make WARNS=5 compliant.
Checked on Alpha and IA32.

Reviewed by: maintainer timeout
MFC after: 1 week


# 108022 18-Dec-2002 sos

On drives that returns 00 as 100% done, lower the criteria
for wraparound, 99 was too much for fast drives since they
do not give 99 as the last value, but instead something
in the 90's range.


# 106059 27-Oct-2002 njl

Take care of the case for the default speed (no -s option) also.


# 106052 27-Oct-2002 njl

Move speed units conversion to right before it is used. This catches the
case when the -s option is not used.


# 106007 26-Oct-2002 njl

Convert speed into KB/s. This was missed by the previous commit to this file.

MFC after: 3 weeks


# 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


# 101502 08-Aug-2002 sos

Add DVD+RW support to the ATA driver and burncd. This also closes
PR40430 by "Peter Haight <peterh@sapros.com>" that has semilar patches
included and which I merged with my own work.

HW sponsored by: FreeBSD Foundation & FreeBSD Mall Inc

Enjoy!


# 95258 22-Apr-2002 des

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


# 93906 05-Apr-2002 sos

Dont quit prematurely when writing from stdin...


# 91644 04-Mar-2002 sos

fix the wildrunning % counter.


# 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


# 88905 05-Jan-2002 sos

Write the "msinfo" result to stdout instead of stderr


# 88529 27-Dec-2001 sos

Fix the msinfo command, as mentioned in several PR's.


# 88452 24-Dec-2001 mikeh

WARNS=2 fixup. Set NO_WERROR due to use of 'j' format specifier.

PR: bin/32567


# 87372 04-Dec-2001 sos

Add the ability to write VCD/SVCD disc's.
It is still nessesary to supply the tracks as individual files, burncd
can't read .cue files yet, but now the infrastructure to do it is
present we just need a .cue file parser (hint hint)...


# 84301 01-Oct-2001 sos

Change the way DAO/TAO modes are init'ed.


# 83339 11-Sep-2001 sos

Use getprogname(3) instead of hardcoding the name..


# 83338 11-Sep-2001 sos

Fixes from Ruslan Ermilov:

1. FreeBSD should be spelled with "F" and "BSD" in capitals,
even in comments.

2. Please don't use hard sentence breaks. Always start a
new sentence from the new line.

3. Don't use `#' or `$' in EXAMPLES; this has been fixed
recently in share/examples/mdoc/ templates.

4. Nuke the prog_name variable burncd.c, use getprogname(3).


# 83297 10-Sep-2001 sos

Add DAO mode (Disk At Once).
See burncd.8 for how to use it.


# 77477 30-May-2001 sos

Change to spell erasing right.

PR 26306 but implemented differently by me.


# 70903 10-Jan-2001 sos

New option -m to select multisession mode.
WARNING: until now all disks was closed as multisession disks, this is
no longer the case, if the -m option isn't used disks are closed as
singlesession. The reason is that some drives wont close a disk
with one large image on in multisession mode, probably because it
"knows" that a new session wont fit on the media resonably.

Also update burncd with new stuff from various places that I've collected
and modified to my taste, its actually amasing how many thinks up the
same enhancements (none mentioned none forgotten):

Allow '-' to be used as filename for using stdin.

Add 'l' option to take a list of image files from 'filename'


# 70362 26-Dec-2000 sos

Update to match the progress interface on blank command.


# 57747 03-Mar-2000 sos

Add msinfo command, used for multisession CD generation with
mkisofs. Gives the last track start LBA, and the next writable LBA.

Inspired by: peter


# 57703 02-Mar-2000 sos

Add a percentage-meter to the progress report.

Submitted by: peter


# 57320 18-Feb-2000 sos

Dont allow burn when format not selected.

Use the right format in printfs.

Fix the partial write error (the res variable).

Reminder by: (Bill Fumerola <billf@FreeBSD.org>)


# 56958 02-Feb-2000 sos

Add mode2 and XAmode1 type CD tracks.


# 56554 24-Jan-2000 sos

Update to keep track of next_writeable in userland.

Recompile both kernel & burncd !!


# 56133 16-Jan-2000 sos

Change the buffer size to 16 blocks, some crappy drives have trouble
with bigger chunks of data at a time.
Add filesize to progress printout.

Submitted by: green@FreeBSD.org <Brian Fundakowski Feldman>


# 56047 15-Jan-2000 sos

Enable the 't' option, and document it in the manpage.

Submitted by: green@freebsd.org <Brian Fundakowski Feldman>


# 55542 07-Jan-2000 sos

Oops, still leftovers from yesterdays remote commit problems.
Proberly restore blocksize on the device.


# 55525 06-Jan-2000 sos

Correct a typo.


# 55522 06-Jan-2000 sos

New ATAPI burner utility. Replaces wormcontrol.