From 022fe92df7e76a7d0bade956c975a8d2f91be6e6 Mon Sep 17 00:00:00 2001 From: sos Date: Tue, 8 Sep 1998 20:51:24 +0000 Subject: Add 'blank' and 'nextwriteable' commands for atapi CD-R/RW support. --- usr.sbin/wormcontrol/wormcontrol.8 | 7 ++++++- usr.sbin/wormcontrol/wormcontrol.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'usr.sbin/wormcontrol') diff --git a/usr.sbin/wormcontrol/wormcontrol.8 b/usr.sbin/wormcontrol/wormcontrol.8 index a3c3d57..6e3a6aa 100644 --- a/usr.sbin/wormcontrol/wormcontrol.8 +++ b/usr.sbin/wormcontrol/wormcontrol.8 @@ -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 diff --git a/usr.sbin/wormcontrol/wormcontrol.c b/usr.sbin/wormcontrol/wormcontrol.c index 5f7aff2..5f43cbd 100644 --- a/usr.sbin/wormcontrol/wormcontrol.c +++ b/usr.sbin/wormcontrol/wormcontrol.c @@ -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 @@ -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]); -- cgit v1.1