• L
    Change virFileOperation to return -errno (ie < 0) on error. · 2ad04f78
    Laine Stump 提交于
    virFileOperation previously returned 0 on success, or the value of
    errno on failure. Although there are other functions in libvirt that
    use this convention, the preferred (and more common) convention is to
    return 0 on success and -errno (or simply -1 in some cases) on
    failure. This way the check for failure is always (ret < 0).
    
    * src/util/util.c - change virFileOperation and virFileOperationNoFork to
                        return -errno on failure.
    
    * src/storage/storage_backend.c, src/qemu/qemu_driver.c
      - change the hook functions passed to virFileOperation to return
        -errno on failure.
    2ad04f78
qemu_driver.c 384.3 KB