1 2 3 4 5 6 7 8 9 10 11 12
%{ #include <linux/key-type.h> %} function key_type:string(_ptr:long) %{ struct key_type *type = (struct key_type *)(long)kread(&(THIS->_ptr)); snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", type->name); CATCH_DEREF_FAULT(); %}