mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
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:
parent
47eb77fb33
commit
fe70fd0c10
@ -27880,14 +27880,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;
|
||||
|
@ -3375,7 +3375,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,
|
||||
|
@ -264,6 +264,7 @@ virDomainDefGetMemoryInitial;
|
||||
virDomainDefGetMemoryTotal;
|
||||
virDomainDefGetOnlineVcpumap;
|
||||
virDomainDefGetSecurityLabelDef;
|
||||
virDomainDefGetShortName;
|
||||
virDomainDefGetVcpu;
|
||||
virDomainDefGetVcpuPinInfoHelper;
|
||||
virDomainDefGetVcpus;
|
||||
@ -460,7 +461,6 @@ virDomainObjGetMetadata;
|
||||
virDomainObjGetOneDef;
|
||||
virDomainObjGetOneDefState;
|
||||
virDomainObjGetPersistentDef;
|
||||
virDomainObjGetShortName;
|
||||
virDomainObjGetState;
|
||||
virDomainObjNew;
|
||||
virDomainObjParseNode;
|
||||
|
@ -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)
|
||||
|
@ -1744,7 +1744,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)
|
||||
@ -8274,7 +8274,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)
|
||||
|
@ -4080,7 +4080,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);
|
||||
|
Loading…
Reference in New Issue
Block a user