diff options
| author | zk194757 <none@none> | 2006-08-09 06:10:41 -0700 |
|---|---|---|
| committer | zk194757 <none@none> | 2006-08-09 06:10:41 -0700 |
| commit | 54cafc857825e2d277385f7e6d64bc8c72b4983e (patch) | |
| tree | e5187a1848c83ecd0c73b057310106542ef19d84 /usr/src/cmd/cdrw | |
| parent | f808c858fa61e7769218966759510a8b1190dfcf (diff) | |
| download | illumos-joyent-54cafc857825e2d277385f7e6d64bc8c72b4983e.tar.gz | |
6446592 cdrw -c does not allow over-writing a non-blank DVD+RW media
6449924 cdrw -c should check media type when disc is inserted
6450059 cdrw -m doesn't work correctly
Diffstat (limited to 'usr/src/cmd/cdrw')
| -rw-r--r-- | usr/src/cmd/cdrw/bstream.c | 9 | ||||
| -rw-r--r-- | usr/src/cmd/cdrw/copycd.c | 16 |
2 files changed, 17 insertions, 8 deletions
diff --git a/usr/src/cmd/cdrw/bstream.c b/usr/src/cmd/cdrw/bstream.c index 73c5f0e6c8..9e1abf6401 100644 --- a/usr/src/cmd/cdrw/bstream.c +++ b/usr/src/cmd/cdrw/bstream.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 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -604,7 +603,7 @@ int check_avail_temp_space(size_t req_size) { struct statvfs buf; - size_t free_size = 0; + u_longlong_t free_size = 0; if (statvfs(get_tmp_name(), &buf) < 0) { return (errno); diff --git a/usr/src/cmd/cdrw/copycd.c b/usr/src/cmd/cdrw/copycd.c index 3194c0aeeb..62e6b39810 100644 --- a/usr/src/cmd/cdrw/copycd.c +++ b/usr/src/cmd/cdrw/copycd.c @@ -233,6 +233,9 @@ copy_cd(void) (void) check_device(src, CHECK_TYPE_NOT_CDROM | CHECK_NO_MEDIA | CHECK_DEVICE_NOT_READY | EXIT_IF_CHECK_FAILED); + /* What type of media are we working with? */ + get_media_type(src->d_fd); + toc = (uchar_t *)my_zalloc(4); if (!read_toc(src->d_fd, 0, 0, 4, toc)) { err_msg(gettext("Cannot read table of contents\n")); @@ -347,10 +350,12 @@ copy_cd(void) * We've finished copying the CD. If source and destination are the same * or they where not specified then eject the disk and wait for a new * disk to be inserted. + * + * Since, DVD+RWs are not blanked just reformated, allow the insertion + * of a DVD+RW to be the only condition necessary to complete copying. */ - while ((target == NULL) || - check_device(target, CHECK_NO_MEDIA|CHECK_MEDIA_IS_NOT_BLANK)) { + do { if (target != NULL) { (void) eject_media(target); } @@ -366,7 +371,12 @@ copy_cd(void) (void) getchar(); (void) sleep(4); (void) setup_target(SCAN_WRITERS); - } + if (target) + get_media_type(target->d_fd); + } while ((target == NULL) || + ((device_type == DVD_PLUS_W)? check_device(target, CHECK_NO_MEDIA): + check_device(target, CHECK_NO_MEDIA|CHECK_MEDIA_IS_NOT_BLANK))); + (void) printf("\n"); (void) setreuid(ruid, 0); |
