summaryrefslogtreecommitdiffstats
path: root/usr.sbin/wormcontrol
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1998-09-08 20:51:24 +0000
committersos <sos@FreeBSD.org>1998-09-08 20:51:24 +0000
commit022fe92df7e76a7d0bade956c975a8d2f91be6e6 (patch)
tree8c158c2502c714b2e23a8273f083fcfdf6089550 /usr.sbin/wormcontrol
parentd91fc542e2ddf714cf31bcb95ee063f2b4c34ddf (diff)
downloadFreeBSD-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')
-rw-r--r--usr.sbin/wormcontrol/wormcontrol.87
-rw-r--r--usr.sbin/wormcontrol/wormcontrol.c14
2 files changed, 19 insertions, 2 deletions
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 <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]);
OpenPOWER on IntegriCloud