projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07f6a48
)
btrfs: create example debugfs file only in debugging build
author
David Sterba
<dsterba@suse.com>
Thu, 1 Sep 2016 12:37:53 +0000
(14:37 +0200)
committer
David Sterba
<dsterba@suse.com>
Mon, 26 Sep 2016 15:59:49 +0000
(17:59 +0200)
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/sysfs.c
b/fs/btrfs/sysfs.c
index 804bd1c42e47fd98617c6634ff3311ccd8bc25d4..e498a472ac207733f67d7dc5697f5aacb8989529 100644
(file)
--- a/
fs/btrfs/sysfs.c
+++ b/
fs/btrfs/sysfs.c
@@
-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;
}