contrib/vhost-user-blk: add missing GOptionEntry NULL terminator
PATCH 1/1 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.
--- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
contrib/vhost-user-blk/vhost-user-blk.c +2 -1
@@ -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)
Signature · 1 line
2.35.1
Quoted 6 lines · Stefan Hajnoczi
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 <[email protected]>
feel free to merge
Quoted 20 lines
--- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)contrib/vhost-user-blk/vhost-user-blk.c +2
-1@@ -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)Signature · 1 line
2.35.1
Stefan Hajnoczi
AppliedQuoted 9 lines · Stefan Hajnoczi
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 <[email protected]>--- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Thanks, applied to my block-next tree:
https://gitlab.com/stefanha/qemu/commits/block-next
Stefan