File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ debugfs::attribute_signed!(IncAttribute, "%#d\n");
66
66
struct RustDebugfs {
67
67
_sample_file : debugfs:: PinnedRegistration ,
68
68
_inc_attribute : debugfs:: PinnedRegistration < Arc < IncAttribute > > ,
69
+ _symlink : debugfs:: Registration < ( ) > ,
69
70
}
70
71
impl kernel:: Module for RustDebugfs {
71
72
fn init ( _module : & ' static ThisModule ) -> Result < Self > {
@@ -81,6 +82,12 @@ impl kernel::Module for RustDebugfs {
81
82
Some ( dir. clone ( ) ) ,
82
83
) ?;
83
84
85
+ let symlink = debugfs:: Registration :: register_symlink (
86
+ c_str ! ( "sample_symlink" ) ,
87
+ Some ( dir. clone ( ) ) ,
88
+ c_str ! ( "sample" ) ,
89
+ ) ?;
90
+
84
91
let attribute = Arc :: pin_init ( pin_init ! ( IncAttribute {
85
92
data <- kernel:: new_spinlock!( 0x42 ) ,
86
93
} ) ) ?;
@@ -93,6 +100,7 @@ impl kernel::Module for RustDebugfs {
93
100
Ok ( Self {
94
101
_sample_file : sample_file,
95
102
_inc_attribute : inc_attribute,
103
+ _symlink : symlink,
96
104
} )
97
105
}
98
106
}
You can’t perform that action at this time.
0 commit comments