[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/

On Wed, Jun 03, 2009 at 03:27:08PM +0200, Daniel Veillard wrote:
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) {
ACK, looks fine. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard