File: syscall-filter.sed

package info (click to toggle)
kbd 2.7.1-2%2Bexp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 16,852 kB
  • sloc: ansic: 13,572; javascript: 3,038; sh: 759; pascal: 643; makefile: 578; lex: 525; yacc: 352; perl: 126; python: 96; sed: 6
file content (11 lines) | stat: -rwxr-xr-x 199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sed -rnf

/^ioctl/ {
	s/^ioctl\([0-9]+,/ioctl(<fd>,/;
	s/\<0x([0-9]|[A-Fa-f]){12,}\>/<ptrval>/g;

	# Hack for musl
	/, TIOCGWINSZ, /d;

	/^ioctl\(<fd>, (KD|KIO|TIO|GIO_|PIO_|VT_)[A-Z]+, /p;
}