]> xenbits.xensource.com Git - libvirt.git/commit
Fix virFileReadLimFD/virFileReadAll to handle EINTR
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 12 Oct 2009 19:32:33 +0000 (20:32 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 13 Oct 2009 15:28:49 +0000 (16:28 +0100)
commit11a36d956cb8a5e439e535bff3e0cfce50a64bca
tree342e880d70695c3f5c244337dfbc1983833f29c7
parent826cbac4591fd5929b497299a90d3a65226b2825
Fix virFileReadLimFD/virFileReadAll to handle EINTR

The fread_file_lim() function uses fread() but never handles
EINTR results, causing unexpected failures when reading QEMU
help arg info. It was unneccessarily using FILE * instead
of plain UNIX file handles, which prevented use of saferead()

* src/util/util.c: Switch fread_file_lim over to use saferead
  instead of fread, remove FILE * use, and rename
src/util/util.c