[libvirt] [PATCH] openvzLoadDomains: don't ignore failing virUUIDFormat

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

 




>From 23d248cec6efee5265bfa61071527506afdab137 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Wed, 17 Feb 2010 15:06:01 +0100
Subject: [PATCH] openvzLoadDomains: don't ignore failing virUUIDFormat

* src/openvz/openvz_conf.c (openvzLoadDomains): Diagnose failure of
virUUIDFormat.
---
 src/openvz/openvz_conf.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 51dbde5..a4aab1e 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -908,7 +908,11 @@ static int
 openvzSetUUID(int vpsid){
     unsigned char uuid[VIR_UUID_BUFLEN];

-    virUUIDGenerate(uuid);
+    if (virUUIDGenerate(uuid)) {
+        openvzError(NULL, VIR_ERR_INTERNAL_ERROR,
+                    "%s", _("Failed to generate UUID"));
+        return -1;
+    }

     return openvzSetDefinedUUID(vpsid, uuid);
 }
--
1.7.0.219.g6bb57

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