[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/2] net/socket: allow ipv6 for net_socket_liste
From: |
Juan Quintela |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Peter Maydell <address@hidden> wrote:
> On 16 March 2011 21:01, Juan Quintela <address@hidden> 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.