summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Hajnoczi2022-04-11 17:00:57 +0200
committerStefan Hajnoczi2022-04-21 12:01:24 +0200
commit096b778f14e7ffabe0e6404fc75dfab981149c33 (patch)
tree287d381b19d18994dc564c6d07119b3b30347071
parentImplements Backend Program conventions for vhost-user-scsi (diff)
downloadqemu-096b778f14e7ffabe0e6404fc75dfab981149c33.tar.gz
qemu-096b778f14e7ffabe0e6404fc75dfab981149c33.tar.xz
qemu-096b778f14e7ffabe0e6404fc75dfab981149c33.zip
contrib/vhost-user-blk: add missing GOptionEntry NULL terminator
The GLib documentation says "a NULL-terminated array of GOptionEntrys" so we'd better make sure there is a terminator that lets g_option_context_add_main_entries() know when the end of the array has been reached. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20220411150057.3009667-1-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--contrib/vhost-user-blk/vhost-user-blk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c
index d14b2896bf..cd4a5d7335 100644
--- a/contrib/vhost-user-blk/vhost-user-blk.c
+++ b/contrib/vhost-user-blk/vhost-user-blk.c
@@ -593,7 +593,8 @@ static GOptionEntry entries[] = {
{"blk-file", 'b', 0, G_OPTION_ARG_FILENAME, &opt_blk_file,
"block device or file path", "PATH"},
{ "read-only", 'r', 0, G_OPTION_ARG_NONE, &opt_read_only,
- "Enable read-only", NULL }
+ "Enable read-only", NULL },
+ { NULL, },
};
int main(int argc, char **argv)