MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / proc_tty_init

Function proc_tty_init

components/dfs/dfs_v2/filesystems/procfs/proc_tty.c:68–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68int proc_tty_init(void)
69{
70 struct proc_dentry *dentry;
71
72 dentry = proc_mkdir("tty", NULL);
73 if (!dentry)
74 return -1;
75
76 proc_release(dentry);
77
78 dentry = proc_mkdir("tty/ldisc", NULL);
79 proc_release(dentry);
80
81 dentry = proc_mkdir_mode("tty/driver", S_IRUSR|S_IXUSR, NULL);
82 proc_release(dentry);
83
84 dentry = proc_create_data("tty/ldiscs", 0, NULL, NULL, NULL);
85 if (dentry)
86 {
87 dentry->seq_ops = &seq_ops;
88 }
89 proc_release(dentry);
90
91 dentry = proc_create_data("tty/drivers", 0, NULL, NULL, NULL);
92 if (dentry)
93 {
94 dentry->seq_ops = &seq_ops;
95 }
96 proc_release(dentry);
97
98 return 0;
99}
100INIT_ENV_EXPORT(proc_tty_init);

Callers

nothing calls this directly

Calls 4

proc_mkdirFunction · 0.85
proc_releaseFunction · 0.85
proc_mkdir_modeFunction · 0.85
proc_create_dataFunction · 0.85

Tested by

no test coverage detected