diff options
author | sos <sos@FreeBSD.org> | 1998-09-08 20:51:24 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1998-09-08 20:51:24 +0000 |
commit | 022fe92df7e76a7d0bade956c975a8d2f91be6e6 (patch) | |
tree | 8c158c2502c714b2e23a8273f083fcfdf6089550 /usr.sbin/wormcontrol/wormcontrol.c | |
parent | d91fc542e2ddf714cf31bcb95ee063f2b4c34ddf (diff) | |
download | FreeBSD-src-022fe92df7e76a7d0bade956c975a8d2f91be6e6.zip FreeBSD-src-022fe92df7e76a7d0bade956c975a8d2f91be6e6.tar.gz |
Add 'blank' and 'nextwriteable' commands for atapi CD-R/RW support.
Diffstat (limited to 'usr.sbin/wormcontrol/wormcontrol.c')
-rw-r--r-- | usr.sbin/wormcontrol/wormcontrol.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 <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]); |