Re: [PATCH v5 8/8] Added /proc/net/sco via bt_procfs_init()

2012-08-15 Thread Jan Engelhardt
On Thursday 2012-07-26 06:24, Gustavo Padovan wrote:

>Hi Masatake,
>
>* Masatake YAMATO  [2012-07-26 01:30:12 +0900]:
>
>> Added /proc/net/sco via bt_procfs_init().
>> 
>> Signed-off-by: Masatake YAMATO 
>> ---
>>  net/bluetooth/sco.c |9 +
>>  1 file changed, 9 insertions(+)
>
>All 8 patches have been applied to bluetooth-next. Thanks.

It may have been raised before, but: should not the info be exported 
over netlink rather than the oldfashioned and overabused procfs?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 8/8] Added /proc/net/sco via bt_procfs_init()

2012-08-15 Thread Jan Engelhardt
On Thursday 2012-07-26 06:24, Gustavo Padovan wrote:

Hi Masatake,

* Masatake YAMATO yam...@redhat.com [2012-07-26 01:30:12 +0900]:

 Added /proc/net/sco via bt_procfs_init().
 
 Signed-off-by: Masatake YAMATO yam...@redhat.com
 ---
  net/bluetooth/sco.c |9 +
  1 file changed, 9 insertions(+)

All 8 patches have been applied to bluetooth-next. Thanks.

It may have been raised before, but: should not the info be exported 
over netlink rather than the oldfashioned and overabused procfs?
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 8/8] Added /proc/net/sco via bt_procfs_init()

2012-07-25 Thread Gustavo Padovan
Hi Masatake,

* Masatake YAMATO  [2012-07-26 01:30:12 +0900]:

> Added /proc/net/sco via bt_procfs_init().
> 
> Signed-off-by: Masatake YAMATO 
> ---
>  net/bluetooth/sco.c |9 +
>  1 file changed, 9 insertions(+)

All 8 patches have been applied to bluetooth-next. Thanks.

Gustavo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v5 8/8] Added /proc/net/sco via bt_procfs_init()

2012-07-25 Thread Masatake YAMATO
Added /proc/net/sco via bt_procfs_init().

Signed-off-by: Masatake YAMATO 
---
 net/bluetooth/sco.c |9 +
 1 file changed, 9 insertions(+)

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, _net, "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, _debugfs_fops);
@@ -1041,6 +1048,8 @@ error:
 
 void __exit sco_exit(void)
 {
+   bt_procfs_cleanup(_net, "sco");
+
debugfs_remove(sco_debugfs);
 
if (bt_sock_unregister(BTPROTO_SCO) < 0)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v5 8/8] Added /proc/net/sco via bt_procfs_init()

2012-07-25 Thread Masatake YAMATO
Added /proc/net/sco via bt_procfs_init().

Signed-off-by: Masatake YAMATO yam...@redhat.com
---
 net/bluetooth/sco.c |9 +
 1 file changed, 9 insertions(+)

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)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v5 8/8] Added /proc/net/sco via bt_procfs_init()

2012-07-25 Thread Gustavo Padovan
Hi Masatake,

* Masatake YAMATO yam...@redhat.com [2012-07-26 01:30:12 +0900]:

 Added /proc/net/sco via bt_procfs_init().
 
 Signed-off-by: Masatake YAMATO yam...@redhat.com
 ---
  net/bluetooth/sco.c |9 +
  1 file changed, 9 insertions(+)

All 8 patches have been applied to bluetooth-next. Thanks.

Gustavo
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/