Package: dcraw
Version: 8.80-1
Severity: normal

It appears that dcraw is ignoring errors--such as ENOSPC (No space left
on device)--that occur when writing a file.

Here is a successful run on a partition with plenty of space. Note that
dcraw returns 0, as it should. (In bash, the command echo $? shows the
return value of the most recent command.) Note that the output file is
about 19MB.
[EMAIL PROTECTED]:~$ dcraw -c CRW_6903.CRW > CRW_6903.ppm
[EMAIL PROTECTED]:~$ echo $?
0
[EMAIL PROTECTED]:~$ ls -l CRW_6903.ppm 
-rw-r--r-- 1 jdietrch jdietrch 19046801 2008-04-30 08:27 CRW_6903.ppm
[EMAIL PROTECTED]:~$ 

Now my /tmp is on a 16MB partition:
[EMAIL PROTECTED]:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hdv1             19534372   3479536  16054836  18% /
none                     16384         0     16384   0% /tmp
[EMAIL PROTECTED]:~$ 

So I would expect an error if I tell dcraw to output that 19MB file
to /tmp. But that's not what happens:
[EMAIL PROTECTED]:~$ dcraw -c CRW_6903.CRW > /tmp/CRW_6903.ppm
[EMAIL PROTECTED]:~$ echo $?
0
[EMAIL PROTECTED]:~$ ls -l /tmp/CRW_6903.ppm 
-rw-r--r-- 1 jdietrch jdietrch 16756736 2008-04-30 08:33
/tmp/CRW_6903.ppm
[EMAIL PROTECTED]:~$ 

Notice that dcraw still returns 0, indicating success, but the output
file
is (obviously) not complete. If I run the same command under strace,
there
are many lines like this at the end of the output:
write(1, "\254qF\254pF\255pD\252qB\251pA\250pA\250oA\247oB\247nA"...,
4096) = -1 ENOSPC (No space left on device)

Expected behaviour: dcraw should not silently discard such errors. They
should be reported, and then dcraw should return a non-zero value.

Let me know if I can provide any further information.

Thank you,
James Dietrich
-- 
  
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to