From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
"Chen, Tiejun" <tiejun.chen@intel.com>,
Alexander Graf <agraf@suse.de>,
stefanha@redhat.com, Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
Date: Mon, 9 Feb 2015 20:56:10 +0100 [thread overview]
Message-ID: <1423511512-29208-1-git-send-email-mst@redhat.com> (raw)
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.
| 10 ++++++++++
1 file changed, 10 insertions(+)
--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
next reply other threads:[~2015-02-09 19:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 19:56 Michael S. Tsirkin [this message]
2015-02-11 1:36 ` [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423511512-29208-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=agraf@suse.de \
--cc=cornelia.huck@de.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=tiejun.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).