mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Add format completion to blockcopy command
Signed-off-by: Lin Ma <lma@suse.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "virkeynametable_linux.h"
|
||||
#include "virkeynametable_osx.h"
|
||||
#include "virkeynametable_win32.h"
|
||||
#include "conf/storage_conf.h"
|
||||
|
||||
char **
|
||||
virshDomainNameCompleter(vshControl *ctl,
|
||||
@@ -976,3 +977,22 @@ virshDomainMigrateCompMethodsCompleter(vshControl *ctl,
|
||||
|
||||
return virshCommaStringListComplete(method, methods);
|
||||
}
|
||||
|
||||
|
||||
char **
|
||||
virshDomainStorageFileFormatCompleter(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_STORAGE_FILE_LAST + 1);
|
||||
|
||||
for (i = 0; i < VIR_STORAGE_FILE_LAST; i++)
|
||||
ret[i] = g_strdup(virStorageFileFormatTypeToString(i));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user