[PATCH] virsh: add error return value

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

 



* tools/virsh.c (cmdSnapshotList): Avoiding to continue to execute subsequent
  codes, the programming should return false when meeting a error.

For details, please see the following link:
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=807545

Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
---
 tools/virsh.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 5009b6b..7e74744 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -16374,6 +16374,7 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
         if (from) {
             vshError(ctl, "%s",
                      _("--roots and --from are mutually exclusive"));
+            return false;
         }
         flags |= VIR_DOMAIN_SNAPSHOT_LIST_ROOTS;
     }
-- 
1.7.1

--
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]