summaryrefslogtreecommitdiffstats
path: root/include/hw/hyperv
diff options
context:
space:
mode:
authorVivek Goyal2021-02-08 23:40:23 +0100
committerDr. David Alan Gilbert2021-02-16 18:03:09 +0100
commit1e08f164e9fdc9528ad6990012301b9a04b0bc90 (patch)
tree03c972153ca2c3881af524ddcff16bd0476ddbe7 /include/hw/hyperv
parenttools/virtiofsd: Replace the word 'whitelist' (diff)
downloadqemu-1e08f164e9fdc9528ad6990012301b9a04b0bc90.tar.gz
qemu-1e08f164e9fdc9528ad6990012301b9a04b0bc90.tar.xz
qemu-1e08f164e9fdc9528ad6990012301b9a04b0bc90.zip
virtiofsd: Save error code early at the failure callsite
Change error code handling slightly in lo_setattr(). Right now we seem to jump to out_err and assume that "errno" is valid and use that to send reply. But if caller has to do some other operations before jumping to out_err, then it does the dance of first saving errno to saverr and the restore errno before jumping to out_err. This makes it more confusing. I am about to make more changes where caller will have to do some work after error before jumping to out_err. I found it easier to change the convention a bit. That is caller saves error in "saverr" before jumping to out_err. And out_err uses "saverr" to send error back and does not rely on "errno" having actual error. v3: Resolved conflicts in lo_setattr() due to lo_inode_open() changes. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20210208224024.43555-2-vgoyal@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'include/hw/hyperv')
0 files changed, 0 insertions, 0 deletions