virsh-completer*.h: Use modern header style

Prevent the need to edit the function declarations to put them into the
header. There was even inconsistent use.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2021-09-16 11:19:01 +02:00
parent 6246bc6601
commit 4402bff1ec
12 changed files with 203 additions and 154 deletions

View File

@ -22,6 +22,7 @@
#include "vsh.h" #include "vsh.h"
char ** virshCheckpointNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshCheckpointNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,37 +22,44 @@
#include "vsh.h" #include "vsh.h"
char ** virshDomainNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
enum { enum {
VIRSH_DOMAIN_INTERFACE_COMPLETER_MAC = 1 << 0, /* Return just MACs */ VIRSH_DOMAIN_INTERFACE_COMPLETER_MAC = 1 << 0, /* Return just MACs */
}; };
char ** virshDomainInterfaceCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainInterfaceCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshDomainDiskTargetCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainDiskTargetCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshDomainEventNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainEventNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshDomainInterfaceStateCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainInterfaceStateCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshDomainDeviceAliasCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainDeviceAliasCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshDomainShutdownModeCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainShutdownModeCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** char **
virshDomainInterfaceAddrSourceCompleter(vshControl *ctl, virshDomainInterfaceAddrSourceCompleter(vshControl *ctl,
@ -64,70 +71,86 @@ virshDomainInterfaceSourceModeCompleter(vshControl *ctl,
const vshCmd *cmd, const vshCmd *cmd,
unsigned int flags); unsigned int flags);
char ** virshDomainHostnameSourceCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainHostnameSourceCompleter(vshControl *ctl,
unsigned int flags);
char ** virshDomainPerfEnableCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainPerfDisableCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainUUIDCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainIOThreadIdCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainVcpuCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainVcpulistCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainCpulistCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainVcpulistViaAgentCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainConsoleCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainSignalCompleter(vshControl *ctl,
const vshCmd *cmd, const vshCmd *cmd,
unsigned int flags); unsigned int flags);
char ** virshDomainLifecycleCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainPerfEnableCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshDomainLifecycleActionCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshDomainPerfDisableCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshCodesetNameCompleter(vshControl *ctl, char **
virshDomainUUIDCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainIOThreadIdCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainVcpuCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainVcpulistCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainCpulistCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainVcpulistViaAgentCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainConsoleCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainSignalCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainLifecycleCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainLifecycleActionCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshCodesetNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshKeycodeNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char **
virshDomainFSMountpointsCompleter(vshControl *ctl,
const vshCmd *cmd, const vshCmd *cmd,
unsigned int flags); unsigned int flags);
char ** virshKeycodeNameCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** virshDomainFSMountpointsCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
char ** char **
virshDomainCoreDumpFormatCompleter(vshControl *ctl, virshDomainCoreDumpFormatCompleter(vshControl *ctl,
const vshCmd *cmd, const vshCmd *cmd,

View File

@ -22,18 +22,22 @@
#include "vsh.h" #include "vsh.h"
char ** virshAllocpagesPagesizeCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshAllocpagesPagesizeCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshCellnoCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshCellnoCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNodeCpuCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNodeCpuCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNodeSuspendTargetCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNodeSuspendTargetCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,10 +22,12 @@
#include "vsh.h" #include "vsh.h"
char ** virshInterfaceNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshInterfaceNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshInterfaceMacCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshInterfaceMacCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,22 +22,27 @@
#include "vsh.h" #include "vsh.h"
char ** virshNetworkNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNetworkNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNetworkEventNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNetworkEventNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNetworkPortUUIDCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNetworkPortUUIDCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNetworkUUIDCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNetworkUUIDCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNetworkDhcpMacCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNetworkDhcpMacCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,14 +22,17 @@
#include "vsh.h" #include "vsh.h"
char ** virshNodeDeviceNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNodeDeviceNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNodeDeviceEventNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNodeDeviceEventNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNodeDeviceCapabilityNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNodeDeviceCapabilityNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,10 +22,12 @@
#include "vsh.h" #include "vsh.h"
char ** virshNWFilterNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNWFilterNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshNWFilterBindingNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshNWFilterBindingNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,14 +22,17 @@
#include "vsh.h" #include "vsh.h"
char ** virshStoragePoolNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshStoragePoolNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshPoolEventNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshPoolEventNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshPoolTypeCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshPoolTypeCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,10 +22,12 @@
#include "vsh.h" #include "vsh.h"
char ** virshSecretUUIDCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshSecretUUIDCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshSecretEventNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshSecretEventNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -22,6 +22,7 @@
#include "vsh.h" #include "vsh.h"
char ** virshSnapshotNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshSnapshotNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -23,11 +23,13 @@
#include "vsh.h" #include "vsh.h"
char ** virshStorageVolNameCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshStorageVolNameCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);
char ** virshStorageVolKeyCompleter(vshControl *ctl, char **
const vshCmd *cmd, virshStorageVolKeyCompleter(vshControl *ctl,
unsigned int flags); const vshCmd *cmd,
unsigned int flags);

View File

@ -32,5 +32,6 @@
#include "virsh-completer-snapshot.h" #include "virsh-completer-snapshot.h"
#include "virsh-completer-volume.h" #include "virsh-completer-volume.h"
char ** virshCommaStringListComplete(const char *input, char **
const char **options); virshCommaStringListComplete(const char *input,
const char **options);