[libvirt] [PATCH 1/2] nwfilter: use shell variable to invoke 'ebtables' command
Eric Blake
eblake at redhat.com
Mon Nov 21 20:40:46 UTC 2011
On 11/21/2011 06:27 AM, Stefan Berger wrote:
> Introduce a shell variable 'EBT' to invoke the ebtables command.
> Hard-code the used ebtables table to '-t nat'.
>
> Tested with libvirt-tck.
>
> @@ -2967,11 +2964,11 @@ _ebtablesRemoveSubChains(virBufferPtr bu
> char rootchain[MAX_CHAINNAME_LENGTH];
> unsigned i;
>
> + NWFILTER_SET_EBTABLES_SHELLVAR(buf);
> +
> virBufferAsprintf(buf, NWFILTER_FUNC_COLLECT_CHAINS,
> - ebtables_cmd_path, EBTABLES_DEFAULT_TABLE, chains);
> - virBufferAsprintf(buf, NWFILTER_FUNC_RM_CHAINS,
> - ebtables_cmd_path, EBTABLES_DEFAULT_TABLE,
> - ebtables_cmd_path, EBTABLES_DEFAULT_TABLE);
> + chains);
> + virBufferAdd(buf, NWFILTER_FUNC_RM_CHAINS, -1);
If I'm not mistaken, virBufferAddLit() should work here, since
NWFILTER_FUNC_FM_CHAINS is a macro for a string literal; but since 'make
syntax-check' can't see through macros, you can get away with this as-is.
ACK, looks like you caught all the places that need it.
--
Eric Blake eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111121/c4f8d80e/attachment-0001.sig>
More information about the libvir-list
mailing list