summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJiang Jiacheng <jiangjiacheng@huawei.com>2022-11-22 09:50:01 +0800
committerMichal Privoznik <mprivozn@redhat.com>2022-11-22 10:15:11 +0100
commit4b90adf65a80c33f3359ba9af01759a2551b51cc (patch)
treec43ec4f33f81ac2d3d4f18d03e4b5ec29f552fff /tools
parentd6ecd766aa95028b35b6da0d709721720c75c7c1 (diff)
downloadlibvirt-4b90adf65a80c33f3359ba9af01759a2551b51cc.tar.gz
lib: Use the same style in the 'struct option'
Use same style in the 'struct option' as: struct option opt[] = { { a, b }, { a, b }, ... { a, b }, }; Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virsh.c24
-rw-r--r--tools/virt-admin.c14
-rw-r--r--tools/virt-host-validate.c8
-rw-r--r--tools/virt-login-shell-helper.c6
-rw-r--r--tools/virt-pki-query-dn.c6
5 files changed, 29 insertions, 29 deletions
diff --git a/tools/virsh.c b/tools/virsh.c
index b37d2ce12f..5696941550 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -638,18 +638,18 @@ virshParseArgv(vshControl *ctl, int argc, char **argv)
int longindex = -1;
virshControl *priv = ctl->privData;
struct option opt[] = {
- {"connect", required_argument, NULL, 'c'},
- {"debug", required_argument, NULL, 'd'},
- {"escape", required_argument, NULL, 'e'},
- {"help", no_argument, NULL, 'h'},
- {"keepalive-interval", required_argument, NULL, 'k'},
- {"keepalive-count", required_argument, NULL, 'K'},
- {"log", required_argument, NULL, 'l'},
- {"quiet", no_argument, NULL, 'q'},
- {"readonly", no_argument, NULL, 'r'},
- {"timing", no_argument, NULL, 't'},
- {"version", optional_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
+ { "connect", required_argument, NULL, 'c' },
+ { "debug", required_argument, NULL, 'd' },
+ { "escape", required_argument, NULL, 'e' },
+ { "help", no_argument, NULL, 'h' },
+ { "keepalive-interval", required_argument, NULL, 'k' },
+ { "keepalive-count", required_argument, NULL, 'K' },
+ { "log", required_argument, NULL, 'l' },
+ { "quiet", no_argument, NULL, 'q' },
+ { "readonly", no_argument, NULL, 'r' },
+ { "timing", no_argument, NULL, 't' },
+ { "version", optional_argument, NULL, 'v' },
+ { NULL, 0, NULL, 0 },
};
/* Standard (non-command) options. The leading + ensures that no
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 11ba242742..85b010b95f 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -1318,13 +1318,13 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **argv)
size_t i;
int longindex = -1;
struct option opt[] = {
- {"connect", required_argument, NULL, 'c'},
- {"debug", required_argument, NULL, 'd'},
- {"help", no_argument, NULL, 'h'},
- {"log", required_argument, NULL, 'l'},
- {"quiet", no_argument, NULL, 'q'},
- {"version", optional_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
+ { "connect", required_argument, NULL, 'c' },
+ { "debug", required_argument, NULL, 'd' },
+ { "help", no_argument, NULL, 'h' },
+ { "log", required_argument, NULL, 'l' },
+ { "quiet", no_argument, NULL, 'q' },
+ { "version", optional_argument, NULL, 'v' },
+ { NULL, 0, NULL, 0 },
};
/* Standard (non-command) options. The leading + ensures that no
diff --git a/tools/virt-host-validate.c b/tools/virt-host-validate.c
index 4dae97910a..52ca729f85 100644
--- a/tools/virt-host-validate.c
+++ b/tools/virt-host-validate.c
@@ -73,10 +73,10 @@ show_version(FILE *out, const char *argv0)
}
static const struct option argOptions[] = {
- { "help", 0, NULL, 'h', },
- { "version", 0, NULL, 'v', },
- { "quiet", 0, NULL, 'q', },
- { NULL, 0, NULL, '\0', }
+ { "help", 0, NULL, 'h' },
+ { "version", 0, NULL, 'v' },
+ { "quiet", 0, NULL, 'q' },
+ { NULL, 0, NULL, '\0' },
};
int
diff --git a/tools/virt-login-shell-helper.c b/tools/virt-login-shell-helper.c
index 3f8757e496..8feeb8f0fe 100644
--- a/tools/virt-login-shell-helper.c
+++ b/tools/virt-login-shell-helper.c
@@ -179,9 +179,9 @@ main(int argc, char **argv)
bool autoshell = false;
struct option opt[] = {
- {"help", no_argument, NULL, 'h'},
- {"version", optional_argument, NULL, 'V'},
- {NULL, 0, NULL, 0}
+ { "help", no_argument, NULL, 'h' },
+ { "version", optional_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 },
};
if (virInitialize() < 0) {
fprintf(stderr, _("Failed to initialize libvirt error handling"));
diff --git a/tools/virt-pki-query-dn.c b/tools/virt-pki-query-dn.c
index ee3783c1b2..2d7849feb7 100644
--- a/tools/virt-pki-query-dn.c
+++ b/tools/virt-pki-query-dn.c
@@ -61,9 +61,9 @@ main(int argc,
int rv = 0;
struct option opt[] = {
- {"help", no_argument, NULL, 'h'},
- {"version", optional_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
+ { "help", no_argument, NULL, 'h' },
+ { "version", optional_argument, NULL, 'v' },
+ { NULL, 0, NULL, 0 },
};
if (virGettextInitialize() < 0)