All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 2/2] net/socket: allow ipv6 for net_socket_listen_init and net_socket_connect_init
Date: Wed, 16 Mar 2011 23:22:01 +0100	[thread overview]
Message-ID: <m3lj0ed7ue.fsf@trasno.org> (raw)
In-Reply-To: <AANLkTimuOiF5KpraLNTnjZ+54_c-3c4FdR55JFvwdK2F@mail.gmail.com> (Peter Maydell's message of "Wed, 16 Mar 2011 21:30:54 +0000")

Peter Maydell <peter.maydell@linaro.org> wrote:
> On 16 March 2011 21:01, Juan Quintela <quintela@redhat.com> wrote:
>> -    ret = bind(fd, (struct sockaddr *)&saddr, sizeof(saddr));
>> +    ret = tcp_server_start(host_str, &fd);
>>     if (ret < 0) {
>> -        perror("bind");
>> +        perror("tcp_server_start");
>>         return -1;
>>     }
>
> It looks like tcp_server_start() returns an error code
> rather than setting errno, so isn't perror() wrong here?

You are right O:-)

I am not clear about what to do here.  Basically we have:
- migration code: uses DPRINTF()
- sockets: use perror() left and right.

Any good idea on what to do everywhere?

For this case, I will just put strerrno(), easy enough.

Thanks a lot, Juan.

      reply	other threads:[~2011-03-16 22:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 21:01 [Qemu-devel] [PATCH 0/2] Allow ipv6 for migration Juan Quintela
2011-03-16 21:01 ` [Qemu-devel] [PATCH 1/2] Use getaddrinfo " Juan Quintela
2011-03-16 22:06   ` Peter Maydell
2011-03-16 22:20     ` [Qemu-devel] " Juan Quintela
2011-03-16 21:01 ` [Qemu-devel] [PATCH 2/2] net/socket: allow ipv6 for net_socket_listen_init and net_socket_connect_init Juan Quintela
2011-03-16 21:30   ` Peter Maydell
2011-03-16 22:22     ` Juan Quintela [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=m3lj0ed7ue.fsf@trasno.org \
    --to=quintela@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.