提交 b0de6c4c 编写于 作者: D David Sterba

btrfs: create example debugfs file only in debugging build

Reviewed-by: NEric Sandeen <sandeen@redhat.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 07f6a480
......@@ -836,8 +836,17 @@ static int btrfs_init_debugfs(void)
if (!btrfs_debugfs_root_dentry)
return -ENOMEM;
/*
* Example code, how to export data through debugfs.
*
* file: /sys/kernel/debug/btrfs/test
* contents of: btrfs_debugfs_test
*/
#ifdef CONFIG_BTRFS_DEBUG
debugfs_create_u64("test", S_IRUGO | S_IWUSR, btrfs_debugfs_root_dentry,
&btrfs_debugfs_test);
#endif
#endif
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册