Commit Graph

48 Commits

Author SHA1 Message Date
David E. O'Brien
613ff97130 Correct the type for the global var accessed in sig handlers. 2009-01-05 16:47:42 +00:00
David E. O'Brien
11a2f37eed Make signal handler safer.
Submitted by:	Jaakko Heinonen <jh@saunalahti.fi>
2008-12-23 17:57:17 +00:00
David E. O'Brien
970bfaf67f 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>
2008-12-19 20:20:14 +00:00
Ruslan Ermilov
de6a1361a5 Fix the "only wrote -1 of 32768 bytes: Input/output error" error message. 2005-05-13 20:06:44 +00:00
Ruslan Ermilov
5d784aa699 Document -F in usage() and SYNOPSIS. 2004-12-21 14:53:44 +00:00
Ruslan Ermilov
c72068b6a8 Make "burncd ... fixate eject" really work as promised. 2004-12-21 14:49:10 +00:00
Ruslan Ermilov
0207facc8f err() -> errx() 2004-12-17 13:24:22 +00:00
Dag-Erling Smørgrav
f2a9e36629 My fingers keep typing 'burncd data foo fixate eject' instead of 'burncd -e
data foo fixate'.  Humor them.

MFC after:	4 weeks
2004-09-15 19:03:35 +00:00
Dag-Erling Smørgrav
d12187d438 Mechanical whitespace cleanup. 2004-09-15 19:01:08 +00:00
Mark Murray
16fc3635f7 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
2004-03-05 08:10:19 +00:00
Alfred Perlstein
87d736a28d Use intmax_t to avoid wrap on large images in verbose output. 2003-12-28 13:32:49 +00:00
Pierre Beyssac
c6df222c98 Fix "write from stdin".
Reviewed by:	sos
MFC after:	1 week
2003-07-26 12:14:58 +00:00
Søren Schmidt
08b25cc045 Add support for using the CDROM env var for device to use;
PR: 38178
2003-05-04 10:09:57 +00:00
Søren Schmidt
01c31bbeca Fix filename printing when using -l option.
PR: 43574
2003-05-04 10:03:15 +00:00
Søren Schmidt
295d40f6b6 Dont fixate when doing dvdrw or test writing.
PR:	47195
2003-05-04 09:55:46 +00:00
David E. O'Brien
fb5506762d Make fully WARNS=5 clean.
Tested on:	sparc64, x86
2002-12-30 10:57:41 +00:00
Garrett Wollman
2ae92e3e07 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
2002-12-29 22:28:51 +00:00
Søren Schmidt
43ab91c3c6 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.
2002-12-18 07:43:42 +00:00
Nate Lawson
c115dd45a4 Take care of the case for the default speed (no -s option) also. 2002-10-27 19:44:57 +00:00
Nate Lawson
cfe6d7e913 Move speed units conversion to right before it is used. This catches the
case when the -s option is not used.
2002-10-27 17:43:22 +00:00
Nate Lawson
dfb87d2239 Convert speed into KB/s. This was missed by the previous commit to this file.
MFC after:	3 weeks
2002-10-26 23:32:35 +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
Søren Schmidt
b2e73852e5 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!
2002-08-08 07:59:24 +00:00
Dag-Erling Smørgrav
d397408818 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}/.
2002-04-22 13:44:47 +00:00
Søren Schmidt
1e1404db2a Dont quit prematurely when writing from stdin... 2002-04-05 19:35:41 +00:00
Søren Schmidt
17744fcb98 fix the wildrunning % counter. 2002-03-04 20:50:16 +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
Søren Schmidt
97d35cf5f8 Write the "msinfo" result to stdout instead of stderr 2002-01-05 15:21:05 +00:00
Søren Schmidt
6361070e82 Fix the msinfo command, as mentioned in several PR's. 2001-12-27 10:10:56 +00:00
Mike Heffner
c82005612f WARNS=2 fixup. Set NO_WERROR due to use of 'j' format specifier.
PR:		bin/32567
2001-12-24 03:20:10 +00:00
Søren Schmidt
2ad690c708 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)...
2001-12-04 21:48:56 +00:00
Søren Schmidt
cebf38db46 Change the way DAO/TAO modes are init'ed. 2001-10-01 14:58:04 +00:00
Søren Schmidt
458f42f154 Use getprogname(3) instead of hardcoding the name.. 2001-09-11 12:14:20 +00:00
Søren Schmidt
869ef2e75f 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).
2001-09-11 11:52:49 +00:00
Søren Schmidt
fe2ea8eb89 Add DAO mode (Disk At Once).
See burncd.8 for how to use it.
2001-09-10 11:44:32 +00:00
Søren Schmidt
94c99813a4 Change to spell erasing right.
PR 26306 but implemented differently by me.
2001-05-30 08:13:39 +00:00
Søren Schmidt
634121d3cb 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'
2001-01-10 19:28:37 +00:00
Søren Schmidt
e3b9882dc4 Update to match the progress interface on blank command. 2000-12-26 11:56:15 +00:00
Søren Schmidt
a6b8984b94 Add msinfo command, used for multisession CD generation with
mkisofs. Gives the last track start LBA, and the next writable LBA.

Inspired by: peter
2000-03-03 23:17:27 +00:00
Søren Schmidt
14283480b3 Add a percentage-meter to the progress report.
Submitted by: peter
2000-03-02 21:49:10 +00:00
Søren Schmidt
fb8dde3146 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>)
2000-02-18 16:36:28 +00:00
Søren Schmidt
fb1fb78a63 Add mode2 and XAmode1 type CD tracks. 2000-02-02 13:38:02 +00:00
Søren Schmidt
bba60a9636 Update to keep track of next_writeable in userland.
Recompile both kernel & burncd !!
2000-01-24 20:29:42 +00:00
Søren Schmidt
b47d790500 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>
2000-01-17 01:43:25 +00:00
Søren Schmidt
32a57b686c Enable the 't' option, and document it in the manpage.
Submitted by: green@freebsd.org <Brian Fundakowski Feldman>
2000-01-15 15:51:47 +00:00
Søren Schmidt
2a6830d22e Oops, still leftovers from yesterdays remote commit problems.
Proberly restore blocksize on the device.
2000-01-07 09:59:31 +00:00
Søren Schmidt
2f4bc071b3 Correct a typo. 2000-01-06 23:10:59 +00:00
Søren Schmidt
191ba01f6a New ATAPI burner utility. Replaces wormcontrol. 2000-01-06 22:46:20 +00:00