On 05/13/2011 02:10 PM, Cole Robinson wrote: > virRunWithHook is now unused, so we can drop it. Tested w/ raw + qcow2 > volume creation and copying. > > v2: > Use opaque data to skip hook second time around > Simply command building > > Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx> > --- > src/libvirt_private.syms | 1 - > src/storage/storage_backend.c | 162 ++++++++++++++++------------------------ > src/util/util.c | 23 ++---- > src/util/util.h | 3 - > 4 files changed, 71 insertions(+), 118 deletions(-) > > @@ -926,13 +895,12 @@ virStorageBackendCreateQcowCreate(virConnectPtr conn ATTRIBUTE_UNUSED, > return -1; > } > > - imgargv[0] = virFindFileInPath("qcow-create"); > - imgargv[1] = size; > - imgargv[2] = vol->target.path; > - imgargv[3] = NULL; > + create_tool = virFindFileInPath("qcow-create"); > + cmd = virCommandNewArgList(create_tool, size, vol->target.path, NULL); Nit - virCommand (via virExecWithHook) already calls virFindFileInPath(argv[0]) if you pass a relative file name, so you could simplify this to: virCommandNewArgList("qcow-create", size, ...) ACK. -- 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