lkml.org 
[lkml]   [2006]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Generic battery interface
On Fri, Jul 28, 2006 at 12:10:43PM -0400, Dmitry Torokhov wrote:
> On 7/28/06, Shem Multinymous <multinymous@gmail.com> wrote:
> >On 7/28/06, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> >> 4) sysfs - all capabilities, IDs, etc for input devices exported there
> >as well.
> >
> >Forgive my ignorance, but how do I conncet a sysfs directory with a /dev
> >device?
> >So far the only way I found is to compare /sys/whatever/dev with the
> >major+minor of the dev file, which requires brute-force enumeration on
> >at least one side.
> >
>
> Can't we have udev make a symlink when it creates device node?

No, ick, why would you want that?

Just look at the "dev" file in sysfs, which shows the major:minor
number.

Or just look at the directory that you are in, and that's almost always
the /dev node name.

For example, /sys/block/sda/sda1/ is /dev/sda1.
/sys/class/tty/ttyS1 is /dev/ttyS1.

It's usually not that difficult to do the mapping :)

thanks,

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

\
 
 \ /
  Last update: 2006-07-30 11:01    [W:0.106 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site