qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] Implement backend program convention command for vhost-us


From: Stefan Hajnoczi
Subject: Re: [PATCH v2] Implement backend program convention command for vhost-user-blk
Date: Mon, 18 Nov 2019 16:54:26 +0000
User-agent: Mutt/1.12.1 (2019-06-15)

On Mon, Nov 18, 2019 at 02:45:19PM +0800, Micky Yun Chan wrote:
> +    context = g_option_context_new(NULL);
> +    g_option_context_add_main_entries(context, entries, NULL);
> +    if (!g_option_context_parse(context, &argc, &argv, &error)) {
> +        g_printerr("Option parsing failed: %s\n", error->message);
> +        exit(EXIT_FAILURE);
> +    }
> +    if (opt_print_caps) {
> +        g_option_context_get_help(context, true, NULL);

Where did the JSON from the previous patch go?

> +        exit(EXIT_SUCCESS);
> +    }
> +
> +    if (!opt_blk_file) {
> +        g_option_context_get_help(context, true, NULL);

Please check the documentation for this function:
https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#g-option-context-get-help

It returns a newly allocated string and does not print it.

> +        exit(EXIT_FAILURE);
> +    }
> +
> +    if (opt_socket_path) {
> +        lsock = unix_sock_new(opt_socket_path);
> +        if (lsock < 0) {
> +           exit(EXIT_FAILURE);
>          }
> +    } else if(opt_fdnum < 0){
> +        g_option_context_get_help(context, true, NULL);

Same here.

exit(EXIT_FAILURE) is missing.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]