On 12/10/2010 01:34 PM, Eric Blake wrote: > On 12/10/2010 12:02 PM, Laine Stump wrote: >> This is pretty straightforward - even though dnsmasq gets daemonized >> and uses a pid file, those things are both handled by the dnsmasq >> binary itself. And libvirt doesn't need any of the output of the >> dnsmasq command either, so we just setup the args and call >> virRun(). Mainly it was just a (mostly) mechanical job of replacing >> the APPEND_ARG() macro (and some other *printfs()) with >> virCommandAddArg*(). >> --- >> src/network/bridge_driver.c | 238 +++++++++++++++---------------------------- >> 1 files changed, 80 insertions(+), 158 deletions(-) >> > >> - if (virAsprintf(&pidfileArg, "--pid-file=%s", pidfile) < 0) >> - goto no_memory; >> - APPEND_ARG_LIT(*argv, i++, pidfileArg); >> + virCommandAddArgPair(cmd, "--pid-file", pidfile); > > This technically changes from one arg to two, but that should be a safe > change. Oops - I didn't read the source. AddArgPair results in a single argument, %s=%s, and not two arguments. So my claim that it changed args from one to two was bogus. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list