diff options
author | zk194757 <none@none> | 2006-03-29 12:58:47 -0800 |
---|---|---|
committer | zk194757 <none@none> | 2006-03-29 12:58:47 -0800 |
commit | 1b01eaa0e4d0703606fba8c845845b4a7f0c0583 (patch) | |
tree | e5f0f029a1e3b1e37a7a74687dfaaddb75a7e35f | |
parent | 6e93b38e61e2cf3c36f56dc2dac897f37b908dfe (diff) | |
download | illumos-gate-1b01eaa0e4d0703606fba8c845845b4a7f0c0583.tar.gz |
6383886 -S option does not work on DVD+RW
-rw-r--r-- | usr/src/cmd/cdrw/copycd.c | 18 | ||||
-rw-r--r-- | usr/src/cmd/cdrw/write_image.c | 20 |
2 files changed, 31 insertions, 7 deletions
diff --git a/usr/src/cmd/cdrw/copycd.c b/usr/src/cmd/cdrw/copycd.c index 396b4ac55f..3194c0aeeb 100644 --- a/usr/src/cmd/cdrw/copycd.c +++ b/usr/src/cmd/cdrw/copycd.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -376,6 +375,19 @@ copy_cd(void) write_init(audio_cd ? TRACK_MODE_AUDIO : TRACK_MODE_DATA); } + /* + * Simulation writing can't happen on DVD+RW's + * or DVD+R's. According to the MMC spec this + * operation is not supported. So we should + * bail out if the user tries to do a simulation + * write. + */ + if (simulation && (device_type == DVD_PLUS_W || + device_type == DVD_PLUS)) { + err_msg(gettext("Media does not support simulated writing.\n")); + exit(1); + } + if (device_type == DVD_PLUS_W) { /* * DVD+RW requires that we format the media before diff --git a/usr/src/cmd/cdrw/write_image.c b/usr/src/cmd/cdrw/write_image.c index dc1569ae19..a6ba50a533 100644 --- a/usr/src/cmd/cdrw/write_image.c +++ b/usr/src/cmd/cdrw/write_image.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -59,6 +58,19 @@ write_image(void) EXIT_IF_CHECK_FAILED); } + /* + * Simulation writing can't happen on DVD+RW's + * or DVD+R's. According to the MMC spec this + * operation is not supported. So we should + * bail out if the user tries to do a simulation + * write. + */ + if (simulation && (device_type == DVD_PLUS_W || + device_type == DVD_PLUS)) { + err_msg(gettext("Media does not support simulated writing.\n")); + exit(1); + } + write_init(TRACK_MODE_DATA); if (image_file) { |