Re: [PATCH] qemu: Fix virFileMakePath error handling in snapshot creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



于 2011年07月04日 16:50, Matthias Bolte 写道:
virFileMakePath returns an errno value on error, that will never be
negative. So a virFileMakePath error whould have been ignored here.

s/whould/should/

---
  src/qemu/qemu_driver.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 363a361..aab3ab9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7498,7 +7498,7 @@ static int qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
          goto cleanup;
      }
      err = virFileMakePath(snapDir);
-    if (err<  0) {
+    if (err != 0) {
          virReportSystemError(err, _("cannot create snapshot directory '%s'"),
                               snapDir);
          goto cleanup;


ACK

Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]