qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ashijeet Acharya <ashijeetacharya@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	"Richard W.M. Jones" <rjones@redhat.com>,
	jcody@redhat.com, Markus Armbruster <armbru@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [v2 2/5] block/ssh: Add InetSocketAddress and accept it
Date: Mon, 17 Oct 2016 21:38:02 +0530	[thread overview]
Message-ID: <CAC2QTZYFS3v9VPcq6d6Rz02czbvSX_t5ZXYZ0Eyv6WheQBXDEA@mail.gmail.com> (raw)
In-Reply-To: <6246d235-edd5-130f-df71-522b4a3a7ad2@redhat.com>

On Mon, Oct 17, 2016 at 9:29 PM, Eric Blake <eblake@redhat.com> wrote:
> On 10/17/2016 10:44 AM, Ashijeet Acharya wrote:
>
>>
>> I think, its better to keep using atoi() and check if it returns a '0'
>
> Please not atoi(), as it lacks sane error checking. It cannot tell the
> difference between '1' and '1garbage'.  It's obvious that you want to
> treat both '0' and 'name' as an error, but that is not the only error
> you want to flag, thus atoi() is insufficient to flag all the errors you
> want.
>
Okay, will using qemu_strtol() be any good as I think it has better
error handling support? Otherwise I will resort to passing -ve value
as Kevin suggested earlier.

Ashijeet
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>

  reply	other threads:[~2016-10-17 16:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-15  9:04 [Qemu-devel] [v2 0/5] Allow blockdev-add for SSH Ashijeet Acharya
2016-10-15  9:04 ` [Qemu-devel] [v2 1/5] block/ssh: Add ssh_has_filename_options_conflict() Ashijeet Acharya
2016-10-15 21:28   ` Max Reitz
2016-10-15  9:04 ` [Qemu-devel] [v2 2/5] block/ssh: Add InetSocketAddress and accept it Ashijeet Acharya
2016-10-15 22:30   ` Max Reitz
2016-10-16  8:53     ` Ashijeet Acharya
2016-10-16  9:10       ` Ashijeet Acharya
2016-10-17 11:27     ` Kevin Wolf
2016-10-17 12:33     ` Ashijeet Acharya
2016-10-17 12:57       ` Kevin Wolf
2016-10-17 15:44         ` Ashijeet Acharya
2016-10-17 15:53           ` Kevin Wolf
2016-10-17 15:56             ` Ashijeet Acharya
2016-10-17 15:59           ` Eric Blake
2016-10-17 16:08             ` Ashijeet Acharya [this message]
2016-10-15  9:04 ` [Qemu-devel] [v2 3/5] block/ssh: Use inet_connect_saddr() to establish socket connection Ashijeet Acharya
2016-10-15 22:34   ` Max Reitz
2016-10-15  9:04 ` [Qemu-devel] [v2 4/5] block/ssh: Use InetSocketAddress options Ashijeet Acharya
2016-10-15 22:37   ` Max Reitz
2016-10-15  9:04 ` [Qemu-devel] [v2 5/5] qapi: allow blockdev-add for ssh Ashijeet Acharya
2016-10-15 22:43   ` Max Reitz
2016-10-15  9:25 ` [Qemu-devel] [v2 0/5] Allow blockdev-add for SSH no-reply
2016-10-17 11:29 ` Kevin Wolf
2016-10-17 12:33   ` Ashijeet Acharya

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=CAC2QTZYFS3v9VPcq6d6Rz02czbvSX_t5ZXYZ0Eyv6WheQBXDEA@mail.gmail.com \
    --to=ashijeetacharya@gmail.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).