-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Makefile tests for lkm_debugfs and little renaming
- Loading branch information
1 parent
e10e932
commit 3f4c103
Showing
3 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* LKM Sandbox::DebugFS | ||
* LKM Sandbox::Debug Filesystem | ||
* <https://github.com/tpiekarski/lkm-sandbox> | ||
* --- | ||
* Copyright 2020 Thomas Piekarski <[email protected]> | ||
|
@@ -45,7 +45,7 @@ static ssize_t debug_write(struct file *fp, const char *buffer, size_t count, | |
char content[LKM_DEBUGFS_CONTENT_LEN]; | ||
static struct dentry *debug_root; | ||
static struct dentry *debug_file_entry; | ||
static u64 value; | ||
static u64 number; | ||
static int file_value; | ||
|
||
static const struct file_operations fops = { .owner = THIS_MODULE, | ||
|
@@ -91,8 +91,9 @@ static int __init lkm_debugfs_init(void) | |
return -ENODEV; | ||
} | ||
|
||
value = 42; | ||
debugfs_create_u64("value", LKM_DEBUGFS_PERMISSION, debug_root, &value); | ||
number = 42; | ||
debugfs_create_u64("number", LKM_DEBUGFS_PERMISSION, debug_root, | ||
&number); | ||
|
||
debug_file_entry = | ||
debugfs_create_file("message", LKM_DEBUGFS_PERMISSION, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters