nwfilter: drop unused flag argument

The public API and RPC over-the-wire format have no flags argument,
so neither should the internal callback API.  This simplifies the
RPC generator.

* src/driver.h (virDrvNWFilterDefineXML): Drop argument that does
not match public API.
* src/nwfilter/nwfilter_driver.c (nwfilterDefine): Likewise.
* src/libvirt.c (virNWFilterDefineXML): Likewise.
* daemon/remote_generator.pl: Drop special case.
This commit is contained in:
Eric Blake 2011-05-11 16:30:36 -06:00
parent cb84580a25
commit 88d03d4ff1
4 changed files with 5 additions and 12 deletions

View File

@ -961,12 +961,6 @@ elsif ($opt_k) {
push(@args_list, "virConnectPtr conn");
}
if ($call->{ProcName} eq "NWFilterDefineXML") {
# SPECIAL: virNWFilterDefineXML has a flags parameter in the
# public API that is missing in the XDR protocol
push(@args_list, "unsigned int flags ATTRIBUTE_UNUSED");
}
# fix priv_name for the NumOf* functions
if ($priv_name eq "privateData" and
!($call->{ProcName} =~ m/(Domains|DomainSnapshot)/) and

View File

@ -1181,8 +1181,7 @@ typedef virNWFilterPtr
const unsigned char *uuid);
typedef virNWFilterPtr
(*virDrvNWFilterDefineXML) (virConnectPtr conn,
const char *xmlDesc,
unsigned int flags);
const char *xmlDesc);
typedef int
(*virDrvNWFilterUndefine) (virNWFilterPtr nwfilter);

View File

@ -12253,7 +12253,7 @@ virNWFilterDefineXML(virConnectPtr conn, const char *xmlDesc)
if (conn->nwfilterDriver && conn->nwfilterDriver->defineXML) {
virNWFilterPtr ret;
ret = conn->nwfilterDriver->defineXML (conn, xmlDesc, 0);
ret = conn->nwfilterDriver->defineXML (conn, xmlDesc);
if (!ret)
goto error;
return ret;

View File

@ -2,7 +2,7 @@
* nwfilter_driver.c: core driver for network filter APIs
* (based on storage_driver.c)
*
* Copyright (C) 2006-2010 Red Hat, Inc.
* Copyright (C) 2006-2011 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
* Copyright (C) 2010 IBM Corporation
* Copyright (C) 2010 Stefan Berger
@ -327,8 +327,8 @@ nwfilterListNWFilters(virConnectPtr conn,
static virNWFilterPtr
nwfilterDefine(virConnectPtr conn,
const char *xml,
unsigned int flags ATTRIBUTE_UNUSED) {
const char *xml)
{
virNWFilterDriverStatePtr driver = conn->nwfilterPrivateData;
virNWFilterDefPtr def;
virNWFilterObjPtr nwfilter = NULL;