Sorry for my silence but I really don't know . I'm not living at home during the school year . I have'n been able to test it here. I will be back home in July , so I may try then.
Anyone with a floppydisk / harddisk with bad sectors can try to reproduce the bug and then try the patch . But is seems that defective hardisk/floppydisks are not easy to find this days. ----- Original Message ----- From: "Jim Meyering" <[EMAIL PROTECTED]> > I don't seem to have ever received feedback about this patch. > Did it solve the problem? > > Paul Eggert <[EMAIL PROTECTED]> wrote: > > Buciuman Adrian <[EMAIL PROTECTED]> writes: > > > >> With the patch applied : sectors 1-72 from the floppy , (1368+1440) * 512 > >> bytes of null padding , > >> sectors 1441 - 2880 from the floppy . > >> > >> ( sector 73 was bad ) > >> > >> Therefore there is still 1 block of null paddding in excess. > > > > Thanks for debugging it further. Can you please try this patch instead? > > It supersedes my September 24 patch. > > > > 2003-10-12 Paul Eggert <[EMAIL PROTECTED]> > > > > Fix bug reported by Buciuman Adrian in > > <http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html> > > where 'dd' created a file that was too large. The bug was that dd > > assumed that the input file offset does not advance after a failed > > read; but POSIX says that the input file offset is undefined after > > a failed read. > > > > * src/dd.c (MAX_BLOCKSIZE): New macro. > > (input_seekable, input_seek_errno, input_offset, > > input_offset_overflow): New vars. > > (write_output, dd_copy): Pass EXIT_FAILURE to quit, not 1. > > (scanargs): Reject block sizes greater than MAX_BLOCKSIZE> > > (advance_input_offset): New function. > > (skip_via_lseek): Set errno to zero when reporting our failure, > > so that we don't report based on garbage errno. > > (skip): If fdesc is standard input, advance the input offset. > > Do not quit if reading, and if noerror was specified; > > POSIX seems to require this. > > If read fails on output file, report the earlier lseek failure > > instead; this fixes a FIXME in dd_copy. > > (advance_input_after_read_error): New function. > > (dd_copy): Use it, instead of assuming that failed reads > > do not advance the file pointer. Advance input offset > > after nonfailed reads. Advance only a partial block if > > the previous read (before the failed read) succeeded, and > > do not generate an output block of zeros in this case. > > (main): Determine initial input offset, seekability of input, > > and error if it wasn't seekable. > _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
