________________________________________ From: Peter Maydell [peter.mayd...@linaro.org] Sent: Tuesday, July 02, 2013 3:44 PM To: Petar Jovanovic Cc: qemu-devel@nongnu.org; Petar Jovanovic; aurel...@aurel32.net; riku.voi...@linaro.org; r...@twiddle.net Subject: Re: [PATCH v3] linux-user: improve target_to_host_sock_type conversion
On 1 July 2013 01:44, Petar Jovanovic <petar.jovano...@rt-rk.com> wrote: > The patch also includes necessary code style changes (tab to spaces) in the > header file since most of the file has been touched by this change. Thanks for the review, Peter. > (The general rule of thumb is "if you're just changing a few lines > of indent/braces in lines that the patch touches anyway" that's fine; > larger scale changes go in their own patch if we do them at all.) I am aware of this, and I originally tried to make these changes as small as possible. Check for the previous two versions of the patch. The commit message originally said: "The patch also includes necessary code style changes (tab to spaces) in the header file in the MIPS #ifdef block touched by the change." Yet, I ended up changing 80% of the header file with this version, so I was under impression it makes sense to change the remaining 20%. > Not using the same base as the kernel (hex vs octal) made checking > the values a bit tedious too, but I think they're all correct. What values are you refering to? I actually tried to copy the values from the kernel in the same format: O_NONBLOCK 00004000 http://lxr.free-electrons.com/source/include/uapi/asm-generic/fcntl.h#L37 O_CLOEXEC 02000000 http://lxr.free-electrons.com/source/include/uapi/asm-generic/fcntl.h#L61 all socket type values: http://lxr.free-electrons.com/source/include/linux/net.h#L58 enum sock_type { SOCK_STREAM = 1, SOCK_DGRAM = 2, SOCK_RAW = 3, SOCK_RDM = 4, SOCK_SEQPACKET = 5, SOCK_DCCP = 6, SOCK_PACKET = 10, }; #define SOCK_TYPE_MASK 0xf Petar