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

[libvirt] [PATCH] forbid autostart on transcient networks



  As the operation doesn't make sense, really,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
Index: src/network_driver.c
===================================================================
RCS file: /data/cvs/libxen/src/network_driver.c,v
retrieving revision 1.28
diff -u -r1.28 network_driver.c
--- src/network_driver.c	29 May 2009 14:18:57 -0000	1.28
+++ src/network_driver.c	3 Jun 2009 13:25:23 -0000
@@ -1353,6 +1353,12 @@
         goto cleanup;
     }
 
+    if (!network->persistent) {
+        networkReportError(net->conn, NULL, net, VIR_ERR_INTERNAL_ERROR,
+                         "%s", _("cannot set autostart for transient network"));
+        goto cleanup;
+    }
+
     autostart = (autostart != 0);
 
     if (network->autostart != autostart) {

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