lkml.org 
[lkml]   [2008]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CONNECTOR: add a proc entry to list connectors
Hi.

On Tue, Jun 24, 2008 at 09:30:44AM +0800, Li Zefan (lizf@cn.fujitsu.com) wrote:
> I got a problem when I wanted to check if the kernel supports process
> event connector, and It seems there's no way to do this check.
>
> At best I can check if the kernel supports connector or not, by looking
> into /proc/net/netlink, or maybe checking the return value of bind() to
> see if it's ENOENT.
>
> So how about add /proc/net/connector to list all supported connectors?
> # cat /proc/net/connector
> Name ID
> connector 4294967295:4294967295
> cn_proc 1:1
> w1 3:1

I like the idea, but if it is not appropriate way, I can extend
connector core itself so it will support not only add/remove
notification of added/removed users, but will also allow to query if
given user exists.

> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

Ack.

> +static int cn_proc_show(struct seq_file *m, void *v)
> +{
> + struct cn_queue_dev *dev = cdev.cbdev;
> + struct cn_callback_entry *cbq;
> + unsigned long flags;
> +
> + seq_printf(m, "Name ID\n");
> +
> + spin_lock_irqsave(&dev->queue_lock, flags);

It can be BH lock only.

--
Evgeniy Polyakov


\
 
 \ /
  Last update: 2008-06-24 08:53    [W:0.686 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site