Re: [Patch v1 2/3] t5318: replace use of /dev/zero with generate_zero_bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Randall S. Becker" <rsbecker@xxxxxxxxxxxxx> writes:

> My second attempt was to create the generate_zero_bytes function to replace
> exactly what the second dd was doing but not user /dev/zero.

Yes, and I think the patch does that ;-)  It was just the original

    dd if=/dev/zero of=... bs=1 seek=$there count=$this_many

would have been impossible to rewrite with the new generate_zero_bytes
helper unless $there weren't seeking to the end of the file.

But the other dd before the one the patch rewrites truncates the
file to make that seek=$there seeking to the end of the file, so
simply appending output from genereate_zero_bytes is sufficient and
correct conversion.  I wanted to explain that for future readers who
may wonder if the patch is doing the exact conversion.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux