Skip to content

Commit de9b921

Browse files
masatakeGustavo Padovan
authored andcommitted
Bluetooth: Added /proc/net/sco via bt_procfs_init()
Added /proc/net/sco via bt_procfs_init(). Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
1 parent c6f5df1 commit de9b921

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎net/bluetooth/sco.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,13 @@ int __init sco_init(void)
10231023
goto error;
10241024
}
10251025

1026+
err = bt_procfs_init(THIS_MODULE, &init_net, "sco", &sco_sk_list, NULL);
1027+
if (err < 0) {
1028+
BT_ERR("Failed to create SCO proc file");
1029+
bt_sock_unregister(BTPROTO_SCO);
1030+
goto error;
1031+
}
1032+
10261033
if (bt_debugfs) {
10271034
sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs,
10281035
NULL, &sco_debugfs_fops);
@@ -1041,6 +1048,8 @@ int __init sco_init(void)
10411048

10421049
void __exit sco_exit(void)
10431050
{
1051+
bt_procfs_cleanup(&init_net, "sco");
1052+
10441053
debugfs_remove(sco_debugfs);
10451054

10461055
if (bt_sock_unregister(BTPROTO_SCO) < 0)

0 commit comments

Comments
 (0)