[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH RFC 1/9] conf: Modify gendispatch.pl to make ACL argument opaque



On 02/11/2017 05:29 PM, John Ferlan wrote:
> The various drivers each have vir*EnsureACL and vir*CheckACL API's
> which are generated on the fly by gendispatch to include the driver
> typed "def" name as the last argument based on the API being checked
> and the driver name (e.g. Node, Interface, Secrets, etc.).
> 
> Rather than having that name by typed, it's possible to generate the
> API prototype using a "void *opaque" argument and then modify the first
> line of the code to make the typed def argumment based off the opaque
> data. This way we can generalize the ACL typedefs in object parsing
> code to just be an opaque type. The next step in that generalization
> is to remove the multiple typdef's and replace it with one general
> typedef in order to further generalize the various drivers object
> and object list handling functions.
> 
> Signed-off-by: John Ferlan <jferlan redhat com>
> ---
>  src/conf/domain_conf.h      | 3 +--
>  src/conf/interface_conf.h   | 3 +--
>  src/conf/network_conf.h     | 3 +--
>  src/conf/node_device_conf.h | 3 +--
>  src/conf/storage_conf.h     | 3 +--
>  src/conf/virsecretobj.h     | 3 +--
>  src/rpc/gendispatch.pl      | 5 ++++-
>  7 files changed, 10 insertions(+), 13 deletions(-)

ACK

Michal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]