debugfs例子
来源:互联网 发布:无锡ntt数据有限公司 编辑:程序博客网 时间:2024/05/16 04:38
static ssize_t anycall_write(struct file *file, const char __user *user_buf, size_t size, loff_t *ppos){char buf[64];int buf_size;int ret=0;buf_size = min(size, (sizeof(buf) - 1));if (strncpy_from_user(buf, user_buf, buf_size) < 0)return -EFAULT;buf[buf_size] = 0;if (ret < 0)return ret; runAny(buf); return size;}static const struct file_operations anycall_fops = {.owner= THIS_MODULE,.write= anycall_write,};static int __init anycall_init(void){ struct dentry *dentry;dentry = debugfs_create_file("anycall", S_IRUGO, NULL, NULL, &anycall_fops);printk(KERN_ERR "[anycall]install anycall !!!!\n");;return 0;}
生成的目录一般在: /sys/kernel/debug
- debugfs例子
- Debugfs
- DebugFS
- debugfs
- 使用debugfs导出调试信息--一个简单的例子
- debugfs exampl
- debugfs 分析
- linux debugfs
- linux debugfs
- procfs、debugfs
- mount debugfs on Linux
- Kprobe和debugfs
- Linux之debugfs介绍
- linux的debugfs
- 运用debugfs调试方法
- Linux之debugfs介绍
- Debugfs的使用简介
- linux debugfs 恢复文件
- android中的ellipsize
- KEILC51编译问题ERROR L104: MULTIPLE PUBLIC DEFINITIONS(重复定义)
- Android listview与adapter用法
- Cocos2d-x 之声音模块的使用
- leetcode:Recover Binary Search Tree (修正二叉查找树错误节点,不改变结构)【面试算法题】
- debugfs例子
- 不定义JQuery插件,不要说会JQuery
- sscanf与sprintf用法总结
- proc fs 例子
- 【转】C# WinForm下DataGridView导出Excel的实现(简单无错版,带另存对话框)
- c#
- ultraedit技巧积累
- VbsEdit 不能调试了
- 【程序员的自我修养】番茄时间管理法:一个番茄是如何让你工作更有效率的