• D
    Fix errno return in safezero() · a8182206
    Daniel P. Berrange 提交于
    Most of the safezero() implementations return -1 on error,
    setting errno. The safezero() impl using posix_fallocate()
    though returned a positive errno value on error (due to
    the unusual API contract of posix_fallocate() compared to
    most syscall APIs).
    
    * src/util/util.c: Ensure safezero() returns -1 and sets
      errno on error.
    * src/storage/storage_backend.c: Change safezero != 0 to
      < 0 for detecting errors
    a8182206
util.c 61.4 KB