mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
tools: virsh: cmdDominfo: rename 'ostype' variable
Use 'ostype' instead of generic 'str', to discourage reuse. Also mark it as autofree. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
65551e2239
commit
7c0443fb73
@ -1276,7 +1276,8 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
bool ret = true;
|
bool ret = true;
|
||||||
int autostart;
|
int autostart;
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
char *str, uuid[VIR_UUID_STRING_BUFLEN];
|
char uuid[VIR_UUID_STRING_BUFLEN];
|
||||||
|
g_autofree char *ostype = NULL;
|
||||||
int has_managed_save = 0;
|
int has_managed_save = 0;
|
||||||
virshControl *priv = ctl->privData;
|
virshControl *priv = ctl->privData;
|
||||||
g_auto(GStrv) messages = NULL;
|
g_auto(GStrv) messages = NULL;
|
||||||
@ -1294,10 +1295,8 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (virDomainGetUUIDString(dom, &uuid[0]) == 0)
|
if (virDomainGetUUIDString(dom, &uuid[0]) == 0)
|
||||||
vshPrint(ctl, "%-15s %s\n", _("UUID:"), uuid);
|
vshPrint(ctl, "%-15s %s\n", _("UUID:"), uuid);
|
||||||
|
|
||||||
if ((str = virDomainGetOSType(dom))) {
|
if ((ostype = virDomainGetOSType(dom)))
|
||||||
vshPrint(ctl, "%-15s %s\n", _("OS Type:"), str);
|
vshPrint(ctl, "%-15s %s\n", _("OS Type:"), ostype);
|
||||||
VIR_FREE(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (virDomainGetInfo(dom, &info) == 0) {
|
if (virDomainGetInfo(dom, &info) == 0) {
|
||||||
vshPrint(ctl, "%-15s %s\n", _("State:"),
|
vshPrint(ctl, "%-15s %s\n", _("State:"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user