update-linux-headers.sh: Handle new kernel uapi/ directories

Recent kernels have moved to keeping the userspace headers
in uapi/ subdirectories. This breaks the detection of whether an
architecture has KVM support in the kernel because kvm.h has
moved in the kernel source tree. Update the check to support
both the old and new locations.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Peter Maydell 2012-10-22 12:54:39 +01:00 committed by Marcelo Tosatti
parent 12869995ea
commit b55f546eef
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ ARCHLIST=$(cd "$linux/arch" && echo *)
for arch in $ARCHLIST; do
# Discard anything which isn't a KVM-supporting architecture
if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ] &&
! [ -e "$linux/arch/$arch/include/uapi/asm/kvm.h" ] ; then
continue
fi