Bluetooth: Added /proc/net/sco via bt_procfs_init()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:23 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=de9b9212c7fd3e87608194f1c73fc06cd6cc7dfb
Commit:     de9b9212c7fd3e87608194f1c73fc06cd6cc7dfb
Parent:     c6f5df16a2710e64090078dfbaa86c54a27c0874
Author:     Masatake YAMATO <yamato at redhat.com>
AuthorDate: Thu Jul 26 01:30:12 2012 +0900
Committer:  Gustavo Padovan <gustavo.padovan at collabora.co.uk>
CommitDate: Mon Aug 6 15:03:00 2012 -0300

    Bluetooth: Added /proc/net/sco via bt_procfs_init()
    
    Added /proc/net/sco via bt_procfs_init().
    
    Signed-off-by: Masatake YAMATO <yamato at redhat.com>
    Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
---
 net/bluetooth/sco.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 0ef5a78..caa109d 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -1023,6 +1023,13 @@ int __init sco_init(void)
 		goto error;
 	}
 
+	err = bt_procfs_init(THIS_MODULE, &init_net, "sco", &sco_sk_list, NULL);
+	if (err < 0) {
+		BT_ERR("Failed to create SCO proc file");
+		bt_sock_unregister(BTPROTO_SCO);
+		goto error;
+	}
+
 	if (bt_debugfs) {
 		sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs,
 						  NULL, &sco_debugfs_fops);
@@ -1041,6 +1048,8 @@ error:
 
 void __exit sco_exit(void)
 {
+	bt_procfs_cleanup(&init_net, "sco");
+
 	debugfs_remove(sco_debugfs);
 
 	if (bt_sock_unregister(BTPROTO_SCO) < 0)



More information about the linux-mtd-cvs mailing list