conf: s/virDomainObjGetShortName/virDomainDefGetShortName/

This function works over domain definition and not domain object.
Its name is thus misleading.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Michal Privoznik 2017-10-23 15:13:09 +02:00
parent 47eb77fb33
commit fe70fd0c10
6 changed files with 8 additions and 8 deletions

View File

@ -27880,14 +27880,14 @@ virDomainDefHasMemballoon(const virDomainDef *def)
#define VIR_DOMAIN_SHORT_NAME_MAX 20 #define VIR_DOMAIN_SHORT_NAME_MAX 20
/** /**
* virDomainObjGetShortName: * virDomainDefGetShortName:
* @vm: Machine for which to get a name * @vm: Machine for which to get a name
* @unique: Make sure the name is unique (use id as well) * @unique: Make sure the name is unique (use id as well)
* *
* Shorten domain name to avoid possible path length limitations. * Shorten domain name to avoid possible path length limitations.
*/ */
char * char *
virDomainObjGetShortName(const virDomainDef *def) virDomainDefGetShortName(const virDomainDef *def)
{ {
wchar_t wshortname[VIR_DOMAIN_SHORT_NAME_MAX + 1] = {0}; wchar_t wshortname[VIR_DOMAIN_SHORT_NAME_MAX + 1] = {0};
size_t len = 0; size_t len = 0;

View File

@ -3375,7 +3375,7 @@ int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
bool virDomainDefHasMemballoon(const virDomainDef *def) ATTRIBUTE_NONNULL(1); 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 int
virDomainGetBlkioParametersAssignFromDef(virDomainDefPtr def, virDomainGetBlkioParametersAssignFromDef(virDomainDefPtr def,

View File

@ -264,6 +264,7 @@ virDomainDefGetMemoryInitial;
virDomainDefGetMemoryTotal; virDomainDefGetMemoryTotal;
virDomainDefGetOnlineVcpumap; virDomainDefGetOnlineVcpumap;
virDomainDefGetSecurityLabelDef; virDomainDefGetSecurityLabelDef;
virDomainDefGetShortName;
virDomainDefGetVcpu; virDomainDefGetVcpu;
virDomainDefGetVcpuPinInfoHelper; virDomainDefGetVcpuPinInfoHelper;
virDomainDefGetVcpus; virDomainDefGetVcpus;
@ -460,7 +461,6 @@ virDomainObjGetMetadata;
virDomainObjGetOneDef; virDomainObjGetOneDef;
virDomainObjGetOneDefState; virDomainObjGetOneDefState;
virDomainObjGetPersistentDef; virDomainObjGetPersistentDef;
virDomainObjGetShortName;
virDomainObjGetState; virDomainObjGetState;
virDomainObjNew; virDomainObjNew;
virDomainObjParseNode; virDomainObjParseNode;

View File

@ -1659,7 +1659,7 @@ qemuGetDomainHugepagePath(const virDomainDef *def,
virHugeTLBFSPtr hugepage) virHugeTLBFSPtr hugepage)
{ {
char *base = qemuGetBaseHugepagePath(hugepage); char *base = qemuGetBaseHugepagePath(hugepage);
char *domPath = virDomainObjGetShortName(def); char *domPath = virDomainDefGetShortName(def);
char *ret = NULL; char *ret = NULL;
if (base && domPath) if (base && domPath)

View File

@ -1744,7 +1744,7 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver,
{ {
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
qemuDomainObjPrivatePtr priv = vm->privateData; qemuDomainObjPrivatePtr priv = vm->privateData;
char *domname = virDomainObjGetShortName(vm->def); char *domname = virDomainDefGetShortName(vm->def);
int ret = -1; int ret = -1;
if (!domname) if (!domname)
@ -8274,7 +8274,7 @@ qemuDomainGetPreservedMountPath(virQEMUDriverConfigPtr cfg,
char *path = NULL; char *path = NULL;
char *tmp; char *tmp;
const char *suffix = mountpoint + strlen(DEVPREFIX); const char *suffix = mountpoint + strlen(DEVPREFIX);
char *domname = virDomainObjGetShortName(vm->def); char *domname = virDomainDefGetShortName(vm->def);
size_t off; size_t off;
if (!domname) if (!domname)

View File

@ -4080,7 +4080,7 @@ getAutoDumpPath(virQEMUDriverPtr driver,
virDomainObjPtr vm) virDomainObjPtr vm)
{ {
char *dumpfile = NULL; char *dumpfile = NULL;
char *domname = virDomainObjGetShortName(vm->def); char *domname = virDomainDefGetShortName(vm->def);
char timestr[100]; char timestr[100];
struct tm time_info; struct tm time_info;
time_t curtime = time(NULL); time_t curtime = time(NULL);