qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
@ 2015-02-09 19:56 Michael S. Tsirkin
  2015-02-11  1:36 ` Chen, Tiejun
  2015-02-11  2:12 ` Peter Maydell
  0 siblings, 2 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2015-02-09 19:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cornelia Huck, Chen, Tiejun, Alexander Graf, stefanha,
	Peter Maydell

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 <mst@redhat.com>
---

FYI this is what I propose instead of the recently
suggested
    virtio: uniform virtio device IDs
we can then rework existing code to include these headers.

Will automatically bring in goodies as they arrive in linux.

This doesn't yet import virtio ccw header,
that won't be hard to add later.

 scripts/update-linux-headers.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index c8e026d..0bd8437 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -76,4 +76,14 @@ else
     cp "$linux/COPYING" "$output/linux-headers"
 fi
 
+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' \
+        -e 's/linux\/types/inttypes/' \
+        -e 's/__bitwise__//' \
+        "$tmpdir/include/linux/$header" > \
+        "$output/standard-headers/linux/$header";
+done
 rm -rf "$tmpdir"
-- 
MST

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-11 14:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 19:56 [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs Michael S. Tsirkin
2015-02-11  1:36 ` Chen, Tiejun
2015-02-11  2:03   ` Peter Maydell
2015-02-11  2:50     ` Chen, Tiejun
2015-02-11  3:46       ` Peter Maydell
2015-02-11  8:08         ` Chen, Tiejun
2015-02-11 12:28         ` Michael S. Tsirkin
2015-02-11  2:12 ` Peter Maydell
2015-02-11 12:33   ` Michael S. Tsirkin
2015-02-11 13:29     ` Peter Maydell
2015-02-11 14:09       ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).