File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 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");
6666struct RustDebugfs {
6767 _sample_file : debugfs:: PinnedRegistration ,
6868 _inc_attribute : debugfs:: PinnedRegistration < Arc < IncAttribute > > ,
69+ _symlink : debugfs:: Registration < ( ) > ,
6970}
7071impl kernel:: Module for RustDebugfs {
7172 fn init ( _module : & ' static ThisModule ) -> Result < Self > {
@@ -81,6 +82,12 @@ impl kernel::Module for RustDebugfs {
8182 Some ( dir. clone ( ) ) ,
8283 ) ?;
8384
85+ let symlink = debugfs:: Registration :: register_symlink (
86+ c_str ! ( "sample_symlink" ) ,
87+ Some ( dir. clone ( ) ) ,
88+ c_str ! ( "sample" ) ,
89+ ) ?;
90+
8491 let attribute = Arc :: pin_init ( pin_init ! ( IncAttribute {
8592 data <- kernel:: new_spinlock!( 0x42 ) ,
8693 } ) ) ?;
@@ -93,6 +100,7 @@ impl kernel::Module for RustDebugfs {
93100 Ok ( Self {
94101 _sample_file : sample_file,
95102 _inc_attribute : inc_attribute,
103+ _symlink : symlink,
96104 } )
97105 }
98106}
You can’t perform that action at this time.
0 commit comments