Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-11 Thread Michael S. Tsirkin
On Wed, Feb 11, 2015 at 01:29:53PM +, Peter Maydell wrote: On 11 February 2015 at 12:33, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Feb 11, 2015 at 02:12:35AM +, Peter Maydell wrote: On 9 February 2015 at 19:56, Michael S. Tsirkin m...@redhat.com wrote: +rm -rf

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-11 Thread Chen, Tiejun
On 2015/2/11 11:46, Peter Maydell wrote: On 11 February 2015 at 02:50, Chen, Tiejun tiejun.c...@intel.com wrote: On 2015/2/11 10:03, Peter Maydell wrote: The linux-headers/ directory contains header files which can only validly be included if the host we're compiling on is Linux. Some of them

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-11 Thread Michael S. Tsirkin
On Wed, Feb 11, 2015 at 03:46:20AM +, Peter Maydell wrote: On 11 February 2015 at 02:50, Chen, Tiejun tiejun.c...@intel.com wrote: On 2015/2/11 10:03, Peter Maydell wrote: The linux-headers/ directory contains header files which can only validly be included if the host we're compiling

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-11 Thread Michael S. Tsirkin
On Wed, Feb 11, 2015 at 02:12:35AM +, Peter Maydell wrote: On 9 February 2015 at 19:56, Michael S. Tsirkin m...@redhat.com wrote: +rm -rf $output/standard-headers/linux +mkdir -p $output/standard-headers/linux +for f in $tmpdir/include/linux/virtio*h; do +header=$(expr $f :

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-11 Thread Peter Maydell
On 11 February 2015 at 12:33, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Feb 11, 2015 at 02:12:35AM +, Peter Maydell wrote: On 9 February 2015 at 19:56, Michael S. Tsirkin m...@redhat.com wrote: +rm -rf $output/standard-headers/linux +mkdir -p $output/standard-headers/linux +for

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-10 Thread Peter Maydell
On 11 February 2015 at 01:36, Chen, Tiejun tiejun.c...@intel.com wrote: On 2015/2/10 3:56, Michael S. Tsirkin wrote: It doesn't make sense to copy values manually: the only issue with getting headers from linux seems to be dealing with linux/types, we can easily fix that automatically while

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-10 Thread Peter Maydell
On 11 February 2015 at 02:50, Chen, Tiejun tiejun.c...@intel.com wrote: On 2015/2/11 10:03, Peter Maydell wrote: The linux-headers/ directory contains header files which can only validly be included if the host we're compiling on is Linux. Some of them will cause compile failures on OSX or

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-10 Thread Chen, Tiejun
On 2015/2/10 3:56, Michael S. Tsirkin wrote: It doesn't make sense to copy values manually: the only issue with getting headers from linux seems to be dealing with linux/types, we can easily fix that automatically while importing. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- FYI this

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-10 Thread Chen, Tiejun
On 2015/2/11 10:03, Peter Maydell wrote: On 11 February 2015 at 01:36, Chen, Tiejun tiejun.c...@intel.com wrote: On 2015/2/10 3:56, Michael S. Tsirkin wrote: It doesn't make sense to copy values manually: the only issue with getting headers from linux seems to be dealing with linux/types, we

Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-10 Thread Peter Maydell
On 9 February 2015 at 19:56, Michael S. Tsirkin m...@redhat.com wrote: +rm -rf $output/standard-headers/linux +mkdir -p $output/standard-headers/linux +for f in $tmpdir/include/linux/virtio*h; do +header=$(expr $f : '.*/\(.*\)'); +sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \ +

[Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-09 Thread Michael S. Tsirkin
It doesn't make sense to copy values manually: the only issue with getting headers from linux seems to be dealing with linux/types, we can easily fix that automatically while importing. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- FYI this is what I propose instead of the recently