According to Jiri Denemark on 3/2/2010 8:11 AM: > Various safezero() implementations used either -1, errno or -errno > return values. This patch fixes them all to return -1 and set errno > appropriately. Correct move, to match the semantics of the HAVE_POSIX_FALLOCATE version. > > There was also a bug in size parameter passed to safewrite() which could > result in an attempt to write gigabytes out of a megabyte buffer. Good catch, since len is off_t. > while (remain) { > if (bytes > remain) > bytes = remain; > > - r = safewrite(fd, buf, len); > + r = safewrite(fd, buf, bytes); ACK. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list