Re: mkisofs aborts but exit value is 0
Hi,
> Then you know that mkisofs does not try to read
> zero sized files.
This might be true if mkisofs is aware of the 0 size.
But in my problem situation, the size known to mkisofs
is not the current size of the file when it comes to reading.
I can prove : in this situation even 0 sized files get read.
Sorry for being such a Rechthaber (= person who insists in being right)
but after browsing up and down in the code of mkisofs i would have
been really astonished if i would have been unable to demonstrate the
effect. 8-)
I tested with mkisofs 2.01 (i686-pc-linux-gnu) and with 2.01.01a03 :
$ ls -l /dvdbuffer/test
-rw-r--r-- 1 thomas thomas 1610612736 Jul 10 20:06 fatso
-rw-r--r-- 1 thomas thomas 4 Aug 4 13:20 stretch
$ mkisofs -J -joliet-long -l -allow-leading-dots -R -D -graft-points \
/dvdbuffer/test/fatso /dvdbuffer/test/stretch \
>/dev/null
While mkisofs was reading file fatso,
...
12.71% done, estimate finish Thu Aug 4 13:25:11 2005
13.35% done, estimate finish Thu Aug 4 13:25:10 2005
...
i executed
$ echo -n >/dvdbuffer/test/stretch
$ ls -l /dvdbuffer/test
-rw-r--r-- 1 thomas thomas 1610612736 Jul 10 20:06 fatso
-rw-r--r-- 1 thomas thomas 0 Aug 4 13:24 stretch
and half a minute later mkisofs ran into the "cannot read" situation :
mkisofs: Inappropriate ioctl for device. cannot read from '/dvdbuffer/test/stretch'
So it read the file despite its size was 0 at the time of fopen().
I believe that the non-"Success" error message is due
to a remnant error number from some previous system call.
Since your announced code change covers this issue by
seterrno(0);
i introduced it into my copy of 2.01.01a3.
Now the error message is :
mkisofs: File too large. cannot read from '/dvdbuffer/test/stretch'
An averagely skilled user would be astonished after executing this :
$ ls -l /dvdbuffer/test/stretch
-rw-r--r-- 1 thomas thomas 0 Aug 4 16:04 /dvdbuffer/test/stretch
I rest my case.
Have a nice day :)
Thomas
Reply to: