Use nice file permission constants, fix readme paths

This commit is contained in:
Ciro Santilli
2017-06-13 09:50:48 +01:00
parent 1f1cf4b0bd
commit 89e6b0f97a
5 changed files with 11 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ Requires `CONFIG_DEBUG_FS=y`.
#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <uapi/linux/stat.h> /* S_IRUSR */
MODULE_LICENSE("GPL");
@@ -25,7 +26,7 @@ static int myinit(void)
printk(KERN_ALERT "debugfs_create_dir failed");
return -1;
}
file = debugfs_create_u32("myfile", 0666, dir, &value);
file = debugfs_create_u32("myfile", S_IRUSR, dir, &value);
if (!file) {
printk(KERN_ALERT "debugfs_create_u32 failed");
return -1;