Re: [Qemu-devel] [PATCH v3 1/4] net/socket: Drop the odd 'default' case and comment

2017-06-11 Thread Mao Zhongyi
Hi, Markus On 06/09/2017 09:22 PM, Markus Armbruster wrote: Mao Zhongyi writes: In the net_socket_fd_init(), the 'default' case and comment is odd. If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If @fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It should not be tre

Re: [Qemu-devel] [PATCH v3 1/4] net/socket: Drop the odd 'default' case and comment

2017-06-09 Thread Markus Armbruster
Mao Zhongyi writes: > In the net_socket_fd_init(), the 'default' case and comment is odd. > If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If > @fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It should > not be treated as if it was SOCK_STREAM. > > If there is a genuine

[Qemu-devel] [PATCH v3 1/4] net/socket: Drop the odd 'default' case and comment

2017-06-09 Thread Mao Zhongyi
In the net_socket_fd_init(), the 'default' case and comment is odd. If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If @fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It should not be treated as if it was SOCK_STREAM. If there is a genuine reason to support something like