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).
This commit is contained in:
Søren Schmidt 2001-09-11 11:52:49 +00:00
parent e5b4aed258
commit 869ef2e75f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83338
2 changed files with 30 additions and 41 deletions

View file

@ -1,5 +1,5 @@
.\"
.\" Copyright (c) 2000,2001 Søren Schmidt <sos@freebsd.org>
.\" Copyright (c) 2000,2001 Søren Schmidt <sos@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@ -35,16 +35,9 @@
.Nd control the ATAPI CD-R/RW driver
.Sh SYNOPSIS
.Nm
.Op Fl delmpqtv
.Op Fl f Ar device
.Op Fl s Ar speed
.Op Fl d
.Op Fl e
.Op Fl l
.Op Fl m
.Op Fl p
.Op Fl q
.Op Fl v
.Op Fl t
.Op Ar command
.Op Ar command Ar
.Sh DESCRIPTION
@ -55,25 +48,25 @@ utility is used to burn CD-R/RW media using the ATAPI cd driver.
Available options and operands:
.Pp
.Bl -tag -width XXXXXXXXXXXX
.It Fl f Ar device
set the device to use for the burning process.
.It Fl s Ar speed
set the speed of the burner device.
Defaults to 1.
.It Fl d
burn the CDR/RW in DAO (disk at once) mode.
burn the CD-R/RW in DAO (disk at once) mode.
.It Fl e
eject the media when done.
.It Fl f Ar device
set the device to use for the burning process.
.It Fl l
read a list of image files from filename.
.It Fl m
close disk in multisession mode (otherwise disk is closed as singlesession).
.It Fl p
use preemphasis on audio tracks.
.It Fl t
test write, do not actually write on the media.
.It Fl q
quiet, do not print progress messages.
.It Fl s Ar speed
set the speed of the burner device.
Defaults to 1.
.It Fl t
test write, do not actually write on the media.
.It Fl v
verbose, print extra progress messages.
.El
@ -104,7 +97,8 @@ The driver defaults to creating singlesession media (see
option).
Should be the last command to
.Nm
as the program exits when this has been done. Ignored in DAO mode (see
as the program exits when this has been done.
Ignored in DAO mode (see
.Fl d
option).
.It Cm raw | audio
@ -135,29 +129,24 @@ The conventional filename
refers to stdin, and can only be used once.
.Sh EXAMPLES
The typical usage for burning a data CD-R:
.Bd -literal
# burncd -f /dev/acd0c data file1 fixate
.Ed
.Pp
.Dl "burncd -f /dev/acd0c data file1 fixate"
.Pp
The typical usage for burning an audio CD-R:
.Bd -literal
# burncd -f /dev/acd0c audio file1 file2 file3 fixate
.Ed
.Pp
.Dl "burncd -f /dev/acd0c audio file1 file2 file3 fixate"
.Pp
The typical usage for burning an audio CD-R in DAO mode:
.Bd -literal
# burncd -f /dev/acd0c -d audio file1 file2 file3
.Ed
.Pp
.Dl "burncd -f /dev/acd0c -d audio file1 file2 file3"
.Pp
The typical usage for burning a mixed mode CD-R:
.Bd -literal
# burncd -f /dev/acd0c data file1 audio file2 file3 fixate
.Ed
.Pp
.Dl "burncd -f /dev/acd0c data file1 audio file2 file3 fixate"
.Pp
The typical usage for burning from a compressed image file on stdin:
.Bd -literal
# gunzip -c file.iso.gz | burncd -f /dev/acd0c data - fixate
.Ed
.Pp
.Dl "gunzip -c file.iso.gz | burncd -f /dev/acd0c data - fixate"
.Sh BUGS
Probably, please report when found.
.Sh HISTORY

View file

@ -64,7 +64,7 @@ int write_file(struct track_info *);
int roundup_blocks(struct track_info *);
void cue_ent(struct cdr_cue_entry *, int, int, int, int, int, int, int);
void cleanup(int);
void usage(const char *);
void usage(void);
int
main(int argc, char **argv)
@ -73,9 +73,8 @@ main(int argc, char **argv)
int dao = 0, eject = 0, fixate = 0, list = 0, multi = 0, preemp = 0;
int speed = 4, test_write = 0;
int block_size = 0, block_type = 0, cdopen = 0;
char *devname = "/dev/acd0c", *prog_name;
char *devname = "/dev/acd0c";
prog_name = argv[0];
while ((ch = getopt(argc, argv, "def:lmpqs:tv")) != -1) {
switch (ch) {
case 'd':
@ -121,14 +120,14 @@ main(int argc, char **argv)
break;
default:
usage(prog_name);
usage();
}
}
argc -= optind;
argv += optind;
if (argc == 0)
usage(prog_name);
usage();
if ((fd = open(devname, O_RDWR, 0)) < 0)
err(EX_NOINPUT, "open(%s)", devname);
@ -536,9 +535,10 @@ cleanup(int dummy)
}
void
usage(const char *prog_name)
usage(void)
{
fprintf(stderr, "Usage: %s [-f device] [-s speed] [-e] [-l] [-m] [-p]\n"
"\t[-q] [command] [command filename...]\n", prog_name);
fprintf(stderr,
"Usage: burncd [-delmpqtv] [-f device] [-s speed] [command]"
" [command file ...]\n");
exit(EX_USAGE);
}