diff options
Diffstat (limited to 'kernel/driver/find_kernel_headers')
-rwxr-xr-x | kernel/driver/find_kernel_headers | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/driver/find_kernel_headers b/kernel/driver/find_kernel_headers new file mode 100755 index 00000000..3d0e505e --- /dev/null +++ b/kernel/driver/find_kernel_headers @@ -0,0 +1,21 @@ +#!/bin/bash + +if test -n "${KDIR}"; then + if test -f ${KDIR}/include/linux/version.h; then + echo ${KDIR} + exit 0 + else + exit 1 + fi +else + if test -f /usr/src/linux/include/linux/version.h; then + echo /usr/src/linux + exit 0 + elif test -f /lib/modules/`uname -r`/build/include/linux/version.h; then + echo /lib/modules/`uname -r`/build + exit 0 + else + exit 1 + fi +fi +
\ No newline at end of file |