[libvirt] [PATCHv2 ACKED 01/15] util: eliminate generic hook from virExecWithHook
Eric Blake
eblake at redhat.com
Wed Feb 13 00:05:27 UTC 2013
On 02/12/2013 01:15 PM, Laine Stump wrote:
> virExecWithHook is only called from one place, so it always has the
> same "hook" function (virHookCommand), and the data sent to that
> function is always a virCommandPtr, so eliminate the function and
> generic data from the arglist, and replace it with "virCommandPtr
> cmd". The call to (hook)(data) is replaced with
> "virHookCommand(cmd)". Finally, virExecWithHook is renamed to virExec.
>
> Indentation has been updated only for code that will remain after the
> next patch, which will remove all other args to virExec (since they
> are now redundant, as they're all members of virCommandPtr).
> ---
> Change from V1: rebased.
>
>
> +static int virCommandHook(virCommandPtr cmd);
> +
Is it worth a separate patch that just does code motion to hoist the
function, to avoid a forward declaration? (I'm a fan of topological
sorting of static functions, where it makes sense, if you haven't guessed.)
But no impact to this particular patch, so the ack stands.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130212/3179b509/attachment-0001.sig>
More information about the libvir-list
mailing list