Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
virshDomainFree(dom);
return ret;
}
+
+
+char **
+virshDomainCoreDumpFormatCompleter(vshControl *ctl G_GNUC_UNUSED,
+ const vshCmd *cmd G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ char **ret = NULL;
+ size_t i;
+
+ virCheckFlags(0, NULL);
+
+ ret = g_new0(char *, VIR_DOMAIN_CORE_DUMP_FORMAT_LAST + 1);
+
+ for (i = 0; i < VIR_DOMAIN_CORE_DUMP_FORMAT_LAST; i++)
+ ret[i] = g_strdup(virDomainCoreDumpFormatTypeToString(i));
+
+ return ret;
+}
char ** virshDomainFSMountpointsCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
+
+char **
+virshDomainCoreDumpFormatCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
},
{.name = "format",
.type = VSH_OT_STRING,
+ .flags = VSH_OFLAG_NONE,
+ .completer = virshDomainCoreDumpFormatCompleter,
.help = N_("specify the format of memory-only dump")
},
{.name = NULL}