1. 18 6月, 2015 29 次提交
  2. 17 6月, 2015 8 次提交
  3. 16 6月, 2015 3 次提交
    • E
    • E
      util: virfile: Fix 'unknown cause' error if NFS mount point creation fails · e9478d9a
      Erik Skultety 提交于
      This happens if user requires creation of a directory with specified
      UID/GID permissions. To accomplish this, we use fork approach and
      set particular UID/GID permissions in child process. However, child
      process doesn't have a valid descriptor to a logfile (this is prohibited
      explicitly) and since parent process doesn't handle negative exit codes from
      child in any way, 'uknown cause' error is returned to the user.
      
      Commit 92d9114e tweaked the way we handle child errors when using fork
      approach to set specific permissions (features originally introduced
      by 98f6f381). The same logic should be used to create directories with
      specified permissions as well.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1230137
      e9478d9a
    • E
      util: virDirCreate: Child now exits with positive errno-code · fdcb057a
      Erik Skultety 提交于
      Previous patch of this series proposed a fix to virDirCreate, so that parent
      process reports an error if child process failed its task.
      However our logic still permits the child to exit with negative errno followed
      by a check of the status on the parent side using WEXITSTATUS which, being
      POSIX compliant, takes the lower 8 bits of the exit code and returns is to
      the caller. However, by taking 8 bits from a negative exit code
      (two's complement) the status value we read and append to stream is
      '2^8 - abs(original exit code)' which doesn't quite reflect the real cause when
      compared to the meaning of errno values.
      fdcb057a