Messages in this thread | | | Date | Tue, 24 Jun 2008 10:49:53 +0400 | From | Evgeniy Polyakov <> | Subject | Re: [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
| |