Re: cdrecord -toc on blank CD-RW exits 0. Intentional ?
scdbackup@gmx.net wrote:
> Hi Joerg,
>
> is it intentional that cdrecord returns exit value 0
> after -toc failed quite loudly on a blank CD-RW ?
>
> If yes: i am curious about the particular reason.
> The exit value on empty tray is 255.
>
>
> $ cdrecord -v dev=0,1,0 -toc && echo "CDRECORD SUCCESS"
> Cdrecord-ProDVD-Clone 2.01.01a12 (i686-pc-linux-gnu)
> Copyright (C) 1995-2006 Jörg Schilling
> ...
> Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
> cdrecord: Input/output error. read toc: scsi sendcmd: no error
> CDB: 43 00 00 00 00 00 00 00 04 00
> status: 0x2 (CHECK CONDITION)
> Sense Bytes: 70 00 05 00 00 00 00 10 43 00 00 90 24 00 00 C0
> Sense Key: 0x5 Illegal Request, Segment 0
> Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
> Sense flags: Blk 0 (not valid) error refers to command part, bit ptr 0 (not valid) field ptr 0
> cmd finished after 0.002s timeout 40s
> cdrecord: Cannot read TOC header
> cdrecord: Cannot read TOC/PMA
> CDRECORD SUCCESS
>
Currently, the official way to check for an empty media is to call
readcd sectors=0-0
This will continue to work for all kind of drives even when future
cdrercorc versions will implement a media status commant for MMC drives.
Jörg
--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
Reply to: