[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 16/19] libxl: call hotplug scripts for nic devices from libxl
On Fri, 2012-07-20 at 15:12 +0100, Roger Pau Monne wrote: > + if (nictype == LIBXL_NIC_TYPE_VIF_IOEMU && num_exec) { > + (*args)[nr++] = action == DEVICE_CONNECT ? "add" : "remove"; > + (*args)[nr++] = libxl__strdup(gc, "type_if=tap"); This strdup (and the one below) are redundant, aren't they? > + (*args)[nr++] = NULL; > + } else { > + (*args)[nr++] = action == DEVICE_CONNECT ? "online" : "offline"; > + (*args)[nr++] = libxl__strdup(gc, "type_if=vif"); > + (*args)[nr++] = NULL; > + } > + assert(nr == arraysize); num_exec is a really clumsy way to track "in need to execute script for type FOO next". Couldn't we have an explicit enum? _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |