[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
Date: Mon, 9 Feb 2015 20:56:10 +0100

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 <address@hidden>

FYI this is what I propose instead of the recently
    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"
+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";
 rm -rf "$tmpdir"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]