1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

Add 'blank' and 'nextwriteable' commands for atapi CD-R/RW support.

This commit is contained in:
Søren Schmidt 1998-09-08 20:51:24 +00:00
parent e17ade2b82
commit 1235adff33
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38955
2 changed files with 19 additions and 2 deletions

View File

@ -32,7 +32,7 @@
.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
.\" DAMAGE.
.\"
.\" $Id: wormcontrol.8,v 1.10 1997/10/27 12:25:37 charnier Exp $
.\" $Id: wormcontrol.8,v 1.11 1998/03/23 08:30:03 charnier Exp $
.\"
.\" arrgh, hilit19 needs this" :-(
.Dd January 27, 1996
@ -127,6 +127,11 @@ stands for
which means that the next session on the CD-R will be opened and can
be recorded in the future. Otherwise, the CD-R will be closed and
remains unchangeable.
.It blank
Blank a CD-RW disk.
.It nextwriteable
Sets the next writeable location on the drive, used when writing
more than one track ie CD-DA (audio) disks.
.El
.Sh DIAGNOSTICS
Error codes for the underlying

View File

@ -35,7 +35,7 @@
#ifndef lint
static const char rcsid[] =
"$Id$";
"$Id: wormcontrol.c,v 1.7 1997/10/27 12:25:38 charnier Exp $";
#endif /* not lint */
#include <err.h>
@ -151,6 +151,18 @@ main(int argc, char **argv)
if (ioctl(fd, WORMIOCFIXATION, &f) == -1)
err(EX_IOERR, "ioctl(WORMIOFIXATION)");
}
else if (eq(argv[0], "blank")) {
#define CDRIOCBLANK _IO('c',100) /* Blank a CDRW disc */
if (ioctl(fd, CDRIOCBLANK) == -1)
err(EX_IOERR, "ioctl(CDRIOCBLANK)");
}
else if (eq(argv[0], "nextwriteable")) {
int addr;
#define CDRIOCNEXTWRITEABLEADDR _IOR('c',101,int)
if (ioctl(fd, CDRIOCNEXTWRITEABLEADDR, &addr) == -1)
err(EX_IOERR, "ioctl(CDRIOCNEXTWRITEABLEADDR)");
printf("%d\n", addr);
}
else
errx(EX_USAGE, "unknown command: %s", argv[0]);