]> granicus.if.org Git - strace/commitdiff
maint: move KVM_* constants from ioctls_inc.h to ioctls_arch.h
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 21 Nov 2016 16:23:14 +0000 (16:23 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 22 Nov 2016 00:15:20 +0000 (00:15 +0000)
* maint/ioctls_gen.sh: Place constants defined in linux/kvm.h
into ioctls_arch.h instead of ioctls_inc.h.

maint/ioctls_gen.sh

index e54dcb5729886fcdad6353f2b563a92c904b8309..b20a0bd146d37334f7f5b71ea2a7cd6eaf02e1b6 100755 (executable)
@@ -87,6 +87,11 @@ msg "generated $(grep -c '^{' ioctls_hex.h) hex ioctls from $inc_dir"
 INCLUDES="$INCLUDES_arch ${INCLUDES-}" \
        "$mydir"/ioctls_sym.sh "$inc_dir" > ioctls_sym.h
 
+# Move KVM_* constants from ioctls_inc.h to ioctls_arch.h.
+grep -F 'linux/kvm.h' < ioctls_sym.h > ioctls_kvm.h ||:
+grep -Fv 'linux/kvm.h' < ioctls_sym.h > ioctls_unkvm.h
+mv ioctls_unkvm.h ioctls_sym.h
+
 # Part of android ioctl commands are defined elsewhere.
 android_dir="$inc_dir/../drivers/staging/android"
 if [ -d "$android_dir/uapi" ]; then
@@ -117,5 +122,5 @@ msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $arch_dir"
 
 # Output all ioctl definitions fetched from arch-include-directory.
 echo "/* Generated by $me from definitions found in ${arch_dir%%/}/ tree. */" > ioctls_arch.h
-LC_COLLATE=C sort -u ioctls_hex.h ioctls_sym.h >> ioctls_arch.h
+LC_COLLATE=C sort -u ioctls_hex.h ioctls_kvm.h ioctls_sym.h >> ioctls_arch.h
 msg "generated $(grep -c '^{' ioctls_arch.h) ioctls from $arch_dir"