linux driver和 /proc 文件的交互
static int agile_proc_read(struct seq_file *m, void *v)
{
char user_str[20] = "user string";
seq_printf(m, "%s\n", user_str);
return 0;
}
static int agile_proc_open(struct inode *inode, struct file *file)
{
// malloc seq_operations 并初始化; 参3:传递priv...
原创
2021-07-15 11:56:52 ·
859 阅读 ·
0 评论