diff options
| author | Benjamin Tissoires <bentiss@kernel.org> | 2025-09-30 16:31:10 +0200 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2025-09-30 16:31:10 +0200 |
| commit | d325efac5938efa3c2a25df72a1bd1af16cd0ed8 (patch) | |
| tree | 6bb0db4f21bd6359bb32f3beeb63231477b09ef3 /scripts/extract-vmlinux | |
| parent | bba920e6f803138587248079de47ad3464a396f6 (diff) | |
| parent | d1dd75c6500c74b91c5286fd3277710371d3e3ca (diff) | |
Merge branch 'for-6.18/core' into for-linus
- allow HID-BPF to rebind a driver to hid-multitouch (Benjamin
Tissoires)
- Change hid_driver to use a const char* for .name (Rahul Rameshbabu)
Diffstat (limited to 'scripts/extract-vmlinux')
| -rwxr-xr-x | scripts/extract-vmlinux | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/extract-vmlinux b/scripts/extract-vmlinux index 8995cd304e6e..189956b5a5c8 100755 --- a/scripts/extract-vmlinux +++ b/scripts/extract-vmlinux @@ -12,13 +12,12 @@ check_vmlinux() { - # Use readelf to check if it's a valid ELF - # TODO: find a better to way to check that it's really vmlinux - # and not just an elf - readelf -h $1 > /dev/null 2>&1 || return 1 - - cat $1 - exit 0 + if file "$1" | grep -q 'Linux kernel.*boot executable' || + readelf -h "$1" > /dev/null 2>&1 + then + cat "$1" + exit 0 + fi } try_decompress() |
