Re: mkisofs aborts but exit value is 0
scdbackup@gmx.net wrote:
> Hi Joerg,
>
> i experienced an abort of mkisofs 2.01a34 which
> -to my best knowledge- returned a 0 exit value.
>
> A possible reason for this 0 exit value can be found in
> the code of 2.01a34, 2.01 and 2.01.01a3 in :
> mkisofs/write.c
> libschily/comerr.c
>
>
> The run of mkisofs aborted with these messages
> 19.36% done, estimate finish Tue Aug 2 08:13:49 2005
> 19.60% done, estimate finish Tue Aug 2 08:13:50 2005
> mkisofs: Success. cannot read from '/home/th.schmitt/mail/scdbackup'
>
> My surrounding script does notice any non-zero exit value
> of mkisofs. This feature has been tested at many occasions.
> This time it did not react on the abort.
> So i conclude that there was a 0 exit value with mkisofs.
>
> The reported file is a mailbox.
>
>
> I looked for possible hints in mkisofs/*.c (2.01a34 to 2.01.01a3)
> and found this "cannot read from" in write.c :
Thank you for the report. The code now looks this way:
memset(buffer, 0, use);
seterrno(0);
if (fread(buffer, 1, use, infile) == 0) {
if (geterrno() == 0)
seterrno(EFBIG);
#ifdef USE_LIBSCHILY
comerr("cannot read from '%s'\n", filename);
#else
fprintf(stderr, "cannot read from '%s'\n", filename);
exit(1);
#endif
BTW: File too large is usually used to deal with the same situation
when writng to a device that is too small.
Do you have an idea for a better errno?
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: