1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
%{ #include <linux/fs.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) #include <linux/path.h> #endif %} function fs_name:string(_fs:long) %{ struct file_system_type *fs = (struct file_system_type *)(long) kread(&(THIS->_fs)); snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", fs->name); CATCH_DEREF_FAULT(); %}