> > +for (i = 0; i < len; i++) {
> > +rc = pread(config_fd, guest->config + list[i].offset,
> > + list[i].len, list[i].offset);
> > +if (rc != list[i].len) {
>
> pread is allowed to return early, returning the number of bytes read.
>
This is a sysfs file tho
On Tue, 5 Jan 2016, Gerd Hoffmann wrote:
> Move all work to the host_pci_config_copy helper function,
> which we can easily reuse when adding q35 support.
> Open sysfs file only once for all values. Use pread.
> Proper error handling. Fix bugs:
>
> * Don't throw away results (like old host_pci_
Move all work to the host_pci_config_copy helper function,
which we can easily reuse when adding q35 support.
Open sysfs file only once for all values. Use pread.
Proper error handling. Fix bugs:
* Don't throw away results (like old host_pci_config_read
did because val was passed by value no