3 # Scans /proc/bus/input/devices for the given device.
5 # (c) 2004 Darren Salt <linux@youmustbejoking.demon.co.uk>
6 # GPL v2 or later applies.
10 # input device name, less leading "input/"
14 # The first found in the given device's "N:" line will be output.
15 DEFAULT_KEYWORDS='dvb|saa7134'
16 KEYWORDS=${2:-$DEFAULT_KEYWORDS}
24 s/^.*\nN:[^\n]*("|\b)('"$KEYWORDS"')("|\b)[^\n]*\n.*$/inputdev/
29 ' < /proc/bus/input/devices