1. 05 1月, 2017 1 次提交
  2. 16 12月, 2016 1 次提交
  3. 15 12月, 2016 2 次提交
  4. 06 12月, 2016 1 次提交
    • M
      util: Introduce virFileRewriteStr · b9b664c5
      Michal Privoznik 提交于
      There are couple of places where we have a string and want to
      save it to a file. Atomically. In all those places we use
      virFileRewrite() but also implement the very same callback which
      takes the string and write it into temp file. This makes no
      sense. Unify the callbacks and move them to one place.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b9b664c5
  5. 01 12月, 2016 1 次提交
    • L
      util: new function virFileLength() · e026563f
      Laine Stump 提交于
      This new function just calls fstat() (if provided with a valid fd) or
      stat() (if fd is -1) and returns st_size (or -1 if there is an
      error). We may decide we want this function to be more complex, and
      handle things like block devices - this is a placeholder (that works)
      for any more complicated function.
      e026563f
  6. 25 11月, 2016 1 次提交
    • M
      virstring: Unify string list function names · c2a5a4e7
      Michal Privoznik 提交于
      We have couple of functions that operate over NULL terminated
      lits of strings. However, our naming sucks:
      
      virStringJoin
      virStringFreeList
      virStringFreeListCount
      virStringArrayHasString
      virStringGetFirstWithPrefix
      
      We can do better:
      
      virStringListJoin
      virStringListFree
      virStringListFreeCount
      virStringListHasString
      virStringListGetFirstWithPrefix
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c2a5a4e7
  7. 24 11月, 2016 1 次提交
  8. 24 6月, 2016 8 次提交
  9. 20 6月, 2016 1 次提交
  10. 13 5月, 2016 1 次提交
  11. 03 5月, 2016 1 次提交
  12. 20 4月, 2016 1 次提交
    • C
      storage: remove support for /usr/bin/kvm-img · 487d211d
      Cole Robinson 提交于
      This an ubuntu/debian packaging convention. At one point it may have
      been an actually different binary, but at least as of ubuntu precise
      (the oldest supported ubuntu distro, released april 2012) kvm-img is
      just a symlink to qemu-img for back compat.
      
      I think it's safe to drop support for it
      487d211d
  13. 19 3月, 2016 1 次提交
  14. 10 3月, 2016 2 次提交
  15. 04 11月, 2015 1 次提交
  16. 21 10月, 2015 1 次提交
  17. 14 10月, 2015 2 次提交
    • J
      storage: On error rmdir created directory in virDirCreate[NoFork] · 21eb8972
      John Ferlan 提交于
      After a successful creation of a directory, if some other call results
      in returning a failure, let's remove the directory we created to
      prevent another round trip or confusion in the caller. In particular, this
      function can be called during a storage backend buildVol, so in order
      to ensure that caller doesn't need to distinguish between failed create
      or some other failure after create, just remove the directory we created.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      21eb8972
    • J
      storage: On error unlink created file in virFileOpen{As|Forked} · 69556215
      John Ferlan 提交于
      After a successful creation of a file, if some other call results
      in returning a failure, let's unlink the file we created to prevent
      another round trip or confusion in the caller. In particular, this
      function can be called during a storage backend buildVol, so in order
      to ensure that caller doesn't need to distinguish between failed create
      or some other failure after create, just remove the volume we created.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      69556215
  18. 05 10月, 2015 2 次提交
    • J
      virfile: Fix error path for forked virFileRemove · cb19cff4
      John Ferlan 提交于
      As it turns out the caller in this case expects a return < 0 for failure
      and to get/use "errno" rather than using the negative of returned status.
      Again different than the create path.
      
      If someone "deleted" a file from the pool without using virsh vol-delete,
      then the unlink/rmdir would return an error (-1) and set errno to ENOENT.
      The caller checks errno for ENOENT when determining whether to throw an
      error message indicating the failure.  Without the change, the error
      message is:
      
      error: Failed to delete vol $vol
      error: cannot unlink file '/$pathto/$vol': Success
      
      This patch thus allows the fork path to follow the non-fork path
      where unlink/rmdir return -1 and errno.
      cb19cff4
    • J
      virfile: Add extra check for direct delete in virFileRemove · c6b32d68
      John Ferlan 提交于
      Unlike create options, if the file to be removed is already in the
      pool, then the uid/gid will come from the pool. If it's the same as the
      currently running process, then just do the unlink/rmdir directly
      rather than going through the fork processing unnecessarily
      c6b32d68
  19. 21 9月, 2015 4 次提交
  20. 16 9月, 2015 1 次提交
    • J
      virfile: Check for existence of dir in virFileDeleteTree · b421a708
      John Ferlan 提交于
      Commit id 'f1f68ca3' added code to remove the directory paths for
      auto-generated sockets, but that code could be called before the
      paths were created resulting in generating error messages from
      virFileDeleteTree indicating that the file doesn't exist.
      
      Rather than "enforce" all callers to make the non-NULL and existence
      checks, modify the virFileDeleteTree API to silently ignore NULL on
      input and non-existent directory trees.
      b421a708
  21. 08 9月, 2015 1 次提交
  22. 05 9月, 2015 1 次提交
    • J
      virfile: Avoid Coverity IDENTICAL_BRANCHES error · 53caf99d
      John Ferlan 提交于
      In virFileNBDDeviceFindUnused if virFileNBDDeviceIsBusy returns 0,
      then both branches jumped to cleanup, so just use ignore_value
      since the function returns NULL or some memory and the caller
      handles the error.
      53caf99d
  23. 02 9月, 2015 2 次提交
    • J
      virfile: Introduce virFileUnlink · 35847860
      John Ferlan 提交于
      In an NFS root-squashed environment the 'vol-delete' command will fail to
      'unlink' the target volume since it was created under a different uid:gid.
      
      This code continues the concepts introduced in virFileOpenForked and
      virDirCreate[NoFork] with respect to running the unlink command under
      the uid/gid of the child. Unlike the other two, don't retry on EACCES
      (that's why we're here doing this now).
      35847860
    • J
      virfile: Add error for root squash change mode failure · 1fafc1bc
      John Ferlan 提交于
      This will only be seen when debugging, but in order to help determine
      whether a virFileOpenForceOwnerMode failed during an NFS root-squash
      volume/file creation, add an error message from the child.
      1fafc1bc
  24. 30 7月, 2015 2 次提交