This function works over domain definition and not domain object. Its name is thus misleading.
Signed-off-by: Michal Privoznik <mpriv...@redhat.com> --- src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_conf.c | 2 +- src/qemu/qemu_domain.c | 4 ++-- src/qemu/qemu_driver.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 77c20c697..58b75c672 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27871,14 +27871,14 @@ virDomainDefHasMemballoon(const virDomainDef *def) #define VIR_DOMAIN_SHORT_NAME_MAX 20 /** - * virDomainObjGetShortName: + * virDomainDefGetShortName: * @vm: Machine for which to get a name * @unique: Make sure the name is unique (use id as well) * * Shorten domain name to avoid possible path length limitations. */ char * -virDomainObjGetShortName(const virDomainDef *def) +virDomainDefGetShortName(const virDomainDef *def) { wchar_t wshortname[VIR_DOMAIN_SHORT_NAME_MAX + 1] = {0}; size_t len = 0; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 38de70b15..bd541a9c5 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3366,7 +3366,7 @@ int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def, bool virDomainDefHasMemballoon(const virDomainDef *def) ATTRIBUTE_NONNULL(1); -char *virDomainObjGetShortName(const virDomainDef *def) ATTRIBUTE_NONNULL(1); +char *virDomainDefGetShortName(const virDomainDef *def) ATTRIBUTE_NONNULL(1); int virDomainGetBlkioParametersAssignFromDef(virDomainDefPtr def, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 448d962b2..3ebff18aa 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -262,6 +262,7 @@ virDomainDefGetMemoryInitial; virDomainDefGetMemoryTotal; virDomainDefGetOnlineVcpumap; virDomainDefGetSecurityLabelDef; +virDomainDefGetShortName; virDomainDefGetVcpu; virDomainDefGetVcpuPinInfoHelper; virDomainDefGetVcpus; @@ -457,7 +458,6 @@ virDomainObjGetMetadata; virDomainObjGetOneDef; virDomainObjGetOneDefState; virDomainObjGetPersistentDef; -virDomainObjGetShortName; virDomainObjGetState; virDomainObjNew; virDomainObjParseNode; diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index ec61c9c52..bf6b334f4 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1659,7 +1659,7 @@ qemuGetDomainHugepagePath(const virDomainDef *def, virHugeTLBFSPtr hugepage) { char *base = qemuGetBaseHugepagePath(hugepage); - char *domPath = virDomainObjGetShortName(def); + char *domPath = virDomainDefGetShortName(def); char *ret = NULL; if (base && domPath) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c7c9e94da..e828fa2f6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1705,7 +1705,7 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver, { virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); qemuDomainObjPrivatePtr priv = vm->privateData; - char *domname = virDomainObjGetShortName(vm->def); + char *domname = virDomainDefGetShortName(vm->def); int ret = -1; if (!domname) @@ -8203,7 +8203,7 @@ qemuDomainGetPreservedMountPath(virQEMUDriverConfigPtr cfg, char *path = NULL; char *tmp; const char *suffix = mountpoint + strlen(DEVPREFIX); - char *domname = virDomainObjGetShortName(vm->def); + char *domname = virDomainDefGetShortName(vm->def); size_t off; if (!domname) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 32a416f9e..dacfca9a9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4079,7 +4079,7 @@ getAutoDumpPath(virQEMUDriverPtr driver, virDomainObjPtr vm) { char *dumpfile = NULL; - char *domname = virDomainObjGetShortName(vm->def); + char *domname = virDomainDefGetShortName(vm->def); char timestr[100]; struct tm time_info; time_t curtime = time(NULL); -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list