All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Micky Yun Chan <chanmickyyun@gmail.com>
Cc: michan <michan@redhat.com>,
	qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2] Implement backend program convention command for vhost-user-blk
Date: Mon, 18 Nov 2019 16:54:26 +0000	[thread overview]
Message-ID: <20191118165426.GB65432@stefanha-x1.localdomain> (raw)
In-Reply-To: <20191118064519.16072-1-michan@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2019-11-18 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18  6:45 [PATCH v2] Implement backend program convention command for vhost-user-blk Micky Yun Chan
2019-11-18 10:21 ` Michael S. Tsirkin
2019-11-18 16:54 ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191118165426.GB65432@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=chanmickyyun@gmail.com \
    --cc=michan@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.