Re: [PATCH] Support empty blob in fsck --lost-found

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

 



BJ Hargrave <bj@xxxxxxxxxxxxxx> writes:

> On Sep 11, 2011, at 16:43 , Junio C Hamano wrote:
>
>> Funny.
>> 
>> I am sure we fixed a similar breakage elsewhere a few years ago, by
>> swapping the size and nmemb to the calls (i.e. instead of writing one
>> block of "size" bytes, you could write "size" blocks of 1-byte) and making
>> sure fwrite() reports the number of items. IOW
>> 
>> 	if (buf && fwrite(buf, 1, size, f) != size)
>> 		die_errno("Could not write '%s'", filename);
>> 
>
> Do you want me to resubmit the patch using this technique instead of the size > 0 check?

Not really.

I am not sure when/why we would try to write an empty blob out to begin
with...
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]