diff mbox series

[kvmtool,01/21] update_headers: Use a list for arch-generic headers

Message ID 20230526221712.317287-2-oliver.upton@linux.dev (mailing list archive)
State New, archived
Headers show
Series arm64: Handle PSCI calls in userspace | expand

Commit Message

Oliver Upton May 26, 2023, 10:16 p.m. UTC
Until now, all of the virtio header names are stuffed in a list and
iteratively copied from the kernel directory. Repurpose this as a list
of arch-generic headers, adding kvm.h to the bunch.

While at it, spread out the definition to have a single element per
line, making it easier to insert elements alphabetically in the future.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
 util/update_headers.sh | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/util/update_headers.sh b/util/update_headers.sh
index 789e2a42b280..4c1be7e84a95 100755
--- a/util/update_headers.sh
+++ b/util/update_headers.sh
@@ -9,10 +9,20 @@ 
 
 set -ue
 
-VIRTIO_LIST="virtio_9p.h virtio_balloon.h virtio_blk.h virtio_config.h \
-	     virtio_console.h virtio_ids.h virtio_mmio.h virtio_net.h \
-	     virtio_pci.h virtio_ring.h virtio_rng.h virtio_scsi.h \
-	     virtio_vsock.h"
+GENERIC_LIST="kvm.h \
+	      virtio_9p.h \
+	      virtio_balloon.h \
+	      virtio_blk.h \
+	      virtio_config.h \
+	      virtio_console.h \
+	      virtio_ids.h \
+	      virtio_mmio.h \
+	      virtio_net.h \
+	      virtio_pci.h \
+	      virtio_ring.h \
+	      virtio_rng.h \
+	      virtio_scsi.h \
+	      virtio_vsock.h"
 
 if [ "$#" -ge 1 ]
 then
@@ -28,9 +38,7 @@  then
 	exit 1
 fi
 
-cp -- "$LINUX_ROOT/include/uapi/linux/kvm.h" include/linux
-
-for header in $VIRTIO_LIST
+for header in $GENERIC_LIST
 do
 	cp -- "$LINUX_ROOT/include/uapi/linux/$header" include/linux
 done