mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-02 10:52:04 +00:00
22 lines
441 B
Bash
22 lines
441 B
Bash
|
function except() {
|
||
|
case $1 in
|
||
|
selinux_file_context_cmp) # ignore
|
||
|
;;
|
||
|
*)
|
||
|
echo "
|
||
|
%exception $1 {
|
||
|
\$action
|
||
|
if (result < 0) {
|
||
|
PyErr_SetFromErrno(PyExc_OSError);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
"
|
||
|
;;
|
||
|
esac
|
||
|
}
|
||
|
echo '#include "../include/selinux/selinux.h"' > temp.c
|
||
|
gcc -c temp.c -aux-info temp.aux
|
||
|
for i in `awk '/..\/include\/selinux\/selinux.h.*extern int/ { print $6 }' temp.aux`; do except $i ; done
|
||
|
rm -f temp.c temp.aux temp.o
|