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

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




>From 23d248cec6efee5265bfa61071527506afdab137 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
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


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