|
|
404507 |
From db9daffe41e8804f9db0fb70678be99e02efc168 Mon Sep 17 00:00:00 2001
|
|
|
404507 |
Message-Id: <db9daffe41e8804f9db0fb70678be99e02efc168@dist-git>
|
|
|
404507 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
404507 |
Date: Thu, 9 Nov 2017 16:06:42 +0100
|
|
|
404507 |
Subject: [PATCH] conf: s/virDomainObjGetShortName/virDomainDefGetShortName/
|
|
|
404507 |
|
|
|
404507 |
https://bugzilla.redhat.com/show_bug.cgi?id=1461214
|
|
|
404507 |
|
|
|
404507 |
This function works over domain definition and not domain object.
|
|
|
404507 |
Its name is thus misleading.
|
|
|
404507 |
|
|
|
404507 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
404507 |
Reviewed-by: John Ferlan <jferlan@redhat.com>
|
|
|
404507 |
(cherry picked from commit fe70fd0c106e7fbe4f7272e5c041324ea3633ce4)
|
|
|
404507 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
404507 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
404507 |
---
|
|
|
404507 |
src/conf/domain_conf.c | 4 ++--
|
|
|
404507 |
src/conf/domain_conf.h | 2 +-
|
|
|
404507 |
src/libvirt_private.syms | 2 +-
|
|
|
404507 |
src/qemu/qemu_conf.c | 2 +-
|
|
|
404507 |
src/qemu/qemu_domain.c | 4 ++--
|
|
|
404507 |
src/qemu/qemu_driver.c | 2 +-
|
|
|
404507 |
6 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
404507 |
|
|
|
404507 |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
404507 |
index 394afb0d80..27cfecffda 100644
|
|
|
404507 |
--- a/src/conf/domain_conf.c
|
|
|
404507 |
+++ b/src/conf/domain_conf.c
|
|
|
404507 |
@@ -27871,14 +27871,14 @@ virDomainDefHasMemballoon(const virDomainDef *def)
|
|
|
404507 |
#define VIR_DOMAIN_SHORT_NAME_MAX 20
|
|
|
404507 |
|
|
|
404507 |
/**
|
|
|
404507 |
- * virDomainObjGetShortName:
|
|
|
404507 |
+ * virDomainDefGetShortName:
|
|
|
404507 |
* @vm: Machine for which to get a name
|
|
|
404507 |
* @unique: Make sure the name is unique (use id as well)
|
|
|
404507 |
*
|
|
|
404507 |
* Shorten domain name to avoid possible path length limitations.
|
|
|
404507 |
*/
|
|
|
404507 |
char *
|
|
|
404507 |
-virDomainObjGetShortName(const virDomainDef *def)
|
|
|
404507 |
+virDomainDefGetShortName(const virDomainDef *def)
|
|
|
404507 |
{
|
|
|
404507 |
wchar_t wshortname[VIR_DOMAIN_SHORT_NAME_MAX + 1] = {0};
|
|
|
404507 |
size_t len = 0;
|
|
|
404507 |
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
|
|
404507 |
index 171f340785..388fa92dda 100644
|
|
|
404507 |
--- a/src/conf/domain_conf.h
|
|
|
404507 |
+++ b/src/conf/domain_conf.h
|
|
|
404507 |
@@ -3366,7 +3366,7 @@ int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
|
|
|
404507 |
|
|
|
404507 |
bool virDomainDefHasMemballoon(const virDomainDef *def) ATTRIBUTE_NONNULL(1);
|
|
|
404507 |
|
|
|
404507 |
-char *virDomainObjGetShortName(const virDomainDef *def) ATTRIBUTE_NONNULL(1);
|
|
|
404507 |
+char *virDomainDefGetShortName(const virDomainDef *def) ATTRIBUTE_NONNULL(1);
|
|
|
404507 |
|
|
|
404507 |
int
|
|
|
404507 |
virDomainGetBlkioParametersAssignFromDef(virDomainDefPtr def,
|
|
|
404507 |
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
|
|
404507 |
index 811d9053e6..6653f95722 100644
|
|
|
404507 |
--- a/src/libvirt_private.syms
|
|
|
404507 |
+++ b/src/libvirt_private.syms
|
|
|
404507 |
@@ -262,6 +262,7 @@ virDomainDefGetMemoryInitial;
|
|
|
404507 |
virDomainDefGetMemoryTotal;
|
|
|
404507 |
virDomainDefGetOnlineVcpumap;
|
|
|
404507 |
virDomainDefGetSecurityLabelDef;
|
|
|
404507 |
+virDomainDefGetShortName;
|
|
|
404507 |
virDomainDefGetVcpu;
|
|
|
404507 |
virDomainDefGetVcpuPinInfoHelper;
|
|
|
404507 |
virDomainDefGetVcpus;
|
|
|
404507 |
@@ -458,7 +459,6 @@ virDomainObjGetMetadata;
|
|
|
404507 |
virDomainObjGetOneDef;
|
|
|
404507 |
virDomainObjGetOneDefState;
|
|
|
404507 |
virDomainObjGetPersistentDef;
|
|
|
404507 |
-virDomainObjGetShortName;
|
|
|
404507 |
virDomainObjGetState;
|
|
|
404507 |
virDomainObjNew;
|
|
|
404507 |
virDomainObjParseNode;
|
|
|
404507 |
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
|
|
404507 |
index 4e5b33b788..66f9761eea 100644
|
|
|
404507 |
--- a/src/qemu/qemu_conf.c
|
|
|
404507 |
+++ b/src/qemu/qemu_conf.c
|
|
|
404507 |
@@ -1676,7 +1676,7 @@ qemuGetDomainHugepagePath(const virDomainDef *def,
|
|
|
404507 |
virHugeTLBFSPtr hugepage)
|
|
|
404507 |
{
|
|
|
404507 |
char *base = qemuGetBaseHugepagePath(hugepage);
|
|
|
404507 |
- char *domPath = virDomainObjGetShortName(def);
|
|
|
404507 |
+ char *domPath = virDomainDefGetShortName(def);
|
|
|
404507 |
char *ret = NULL;
|
|
|
404507 |
|
|
|
404507 |
if (base && domPath)
|
|
|
404507 |
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
|
|
404507 |
index 81bfef946e..27117d83ef 100644
|
|
|
404507 |
--- a/src/qemu/qemu_domain.c
|
|
|
404507 |
+++ b/src/qemu/qemu_domain.c
|
|
|
404507 |
@@ -1706,7 +1706,7 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver,
|
|
|
404507 |
{
|
|
|
404507 |
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
|
|
|
404507 |
qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
404507 |
- char *domname = virDomainObjGetShortName(vm->def);
|
|
|
404507 |
+ char *domname = virDomainDefGetShortName(vm->def);
|
|
|
404507 |
int ret = -1;
|
|
|
404507 |
|
|
|
404507 |
if (!domname)
|
|
|
404507 |
@@ -8207,7 +8207,7 @@ qemuDomainGetPreservedMountPath(virQEMUDriverConfigPtr cfg,
|
|
|
404507 |
char *path = NULL;
|
|
|
404507 |
char *tmp;
|
|
|
404507 |
const char *suffix = mountpoint + strlen(DEVPREFIX);
|
|
|
404507 |
- char *domname = virDomainObjGetShortName(vm->def);
|
|
|
404507 |
+ char *domname = virDomainDefGetShortName(vm->def);
|
|
|
404507 |
size_t off;
|
|
|
404507 |
|
|
|
404507 |
if (!domname)
|
|
|
404507 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
404507 |
index 82c60e6ef1..5617c78997 100644
|
|
|
404507 |
--- a/src/qemu/qemu_driver.c
|
|
|
404507 |
+++ b/src/qemu/qemu_driver.c
|
|
|
404507 |
@@ -4088,7 +4088,7 @@ getAutoDumpPath(virQEMUDriverPtr driver,
|
|
|
404507 |
virDomainObjPtr vm)
|
|
|
404507 |
{
|
|
|
404507 |
char *dumpfile = NULL;
|
|
|
404507 |
- char *domname = virDomainObjGetShortName(vm->def);
|
|
|
404507 |
+ char *domname = virDomainDefGetShortName(vm->def);
|
|
|
404507 |
char timestr[100];
|
|
|
404507 |
struct tm time_info;
|
|
|
404507 |
time_t curtime = time(NULL);
|
|
|
404507 |
--
|
|
|
404507 |
2.15.0
|
|
|
404507 |
|