[PATCH v1 01/12] libxl: add API wrapper for libxl_domain_create_restore
Jim Fehlig
jfehlig at suse.com
Fri Mar 19 03:51:18 UTC 2021
On 3/18/21 5:00 PM, Olaf Hering wrote:
> Am Thu, 18 Mar 2021 16:26:14 -0600
> schrieb Jim Fehlig <jfehlig at suse.com>:
>
>> Maybe libxlDomainCreateRestoreWrap?
>> The 'Wrap' suffix compliments the libxl_api_wrap.h name suggestion.
>
> "Naming conventions" does not cover API wrapping.
I was referring to the use of '_' in the names. From the coding style doc:
"Underscores should not be used in function names". The style doc doesn't
dictate the words used to form function names, but does suggest a
vir$object$verb$subject pattern.
> Some of the names are already taken, like libxl_domain_shutdown/libxlDomainShutdown.
In hindsight I would have probably used the 'vir' prefix in the driver entry
points, e.g. virlibxlDomainShutdown (libxl_driver.c), giving some flexibility
for driver-internal function naming. There is nothing preventing such change
now, other than the future annoyance of backport conflicts.
> This is the reason why I just used uppercase for the first letter of the libxl function.
>
> I assume virLibxlDomainShutdown may work, because in the end the wrappers are a libvirt thing.
Unless someone listening has a better idea, I lean towards libxl_api_wrapper.h
with function names libxl*Wrapper.
Jim
More information about the libvir-list
mailing list