diff options
author | av <av@cvs.openbsd.org> | 2008-08-13 12:21:20 +0000 |
---|---|---|
committer | av <av@cvs.openbsd.org> | 2008-08-13 12:21:20 +0000 |
commit | 94345a96b6867ba746f48e4f629784c0e9764290 (patch) | |
tree | 5163ea34b2d3e57422b011dfc129fb25edf22676 /usr.bin/cdio/cdio.c | |
parent | 2a6b706b53fb10c22090dfe938393927ba883962 (diff) |
Old drives (reported Giovanni Bechis <bigionews@snb.it>) don't report CD-RW
write feature. Add additional check for media type before blanking.
The patch fixes problem for Giovanni.
ok fgsch
Diffstat (limited to 'usr.bin/cdio/cdio.c')
-rw-r--r-- | usr.bin/cdio/cdio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cdio/cdio.c b/usr.bin/cdio/cdio.c index cbf194afe42..a5d2a8900e9 100644 --- a/usr.bin/cdio/cdio.c +++ b/usr.bin/cdio/cdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cdio.c,v 1.65 2008/08/08 07:26:40 fgsch Exp $ */ +/* $OpenBSD: cdio.c,v 1.66 2008/08/13 12:21:19 av Exp $ */ /* Copyright (c) 1995 Serge V. Vakulenko * All rights reserved. @@ -517,7 +517,8 @@ run(int cmd, char *arg) warnx("Can't determine media type"); return (0); } - if ((mediacap & MEDIACAP_CDRW_WRITE) == 0) { + if ((mediacap & MEDIACAP_CDRW_WRITE) == 0 && + get_media_type() != MEDIATYPE_CDRW) { warnx("The media doesn't support blanking"); return (0); } |