Re: Rules on how to use sysfs in userspace programs

2007-06-25 Thread Rob Landley
On Monday 25 June 2007 10:57:35 Kay Sievers wrote: > > > Sure, all devices have a "subsystem" link, you have to readlink() > > > that, and if it ends in "block, you have a blockdev. But as mentioned > > > in an earlier mail, you should stop scanning /sys/devices/ and always > > > come from the subs

Re: Rules on how to use sysfs in userspace programs

2007-06-25 Thread Kay Sievers
On 6/24/07, Rob Landley <[EMAIL PROTECTED]> wrote: On Sunday 24 June 2007 07:03:39 Kay Sievers wrote: > On 6/24/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > On Saturday 23 June 2007 08:49:47 Kay Sievers wrote: > > > On 6/22/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > > > On Friday 08 June 20

Re: Rules on how to use sysfs in userspace programs

2007-06-24 Thread Rob Landley
On Sunday 24 June 2007 07:03:39 Kay Sievers wrote: > On 6/24/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > On Saturday 23 June 2007 08:49:47 Kay Sievers wrote: > > > On 6/22/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > > > On Friday 08 June 2007 16:36:37 Greg KH wrote: > > > > > Over time there

Re: Rules on how to use sysfs in userspace programs

2007-06-24 Thread Kay Sievers
On 6/24/07, Rob Landley <[EMAIL PROTECTED]> wrote: On Saturday 23 June 2007 08:49:47 Kay Sievers wrote: > On 6/22/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > On Friday 08 June 2007 16:36:37 Greg KH wrote: > > > Over time there have been a number of problems when sysfs has changed > > > in "une

Re: Rules on how to use sysfs in userspace programs

2007-06-23 Thread Rob Landley
On Saturday 23 June 2007 08:49:47 Kay Sievers wrote: > On 6/22/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > On Friday 08 June 2007 16:36:37 Greg KH wrote: > > > Over time there have been a number of problems when sysfs has changed > > > in "unexpected" ways. Here's a document that Kay wrote a wh

Re: Rules on how to use sysfs in userspace programs

2007-06-23 Thread Kay Sievers
On 6/22/07, Rob Landley <[EMAIL PROTECTED]> wrote: On Friday 08 June 2007 16:36:37 Greg KH wrote: > Over time there have been a number of problems when sysfs has changed in > "unexpected" ways. Here's a document that Kay wrote a while ago that > I'd like to add to the kernel Documentation direct

Re: Rules on how to use sysfs in userspace programs

2007-06-22 Thread Rob Landley
On Friday 08 June 2007 16:36:37 Greg KH wrote: > Over time there have been a number of problems when sysfs has changed in > "unexpected" ways. Here's a document that Kay wrote a while ago that > I'd like to add to the kernel Documentation directory to help userspace > programmers out. > > Any comm

Re: Rules on how to use sysfs in userspace programs

2007-06-10 Thread Kay Sievers
On Sun, 2007-06-10 at 09:56 -0700, Randy Dunlap wrote: > On Sun, 10 Jun 2007 10:02:00 -0400 Theodore Tso wrote: > > > On Fri, Jun 08, 2007 at 01:36:37PM -0700, Greg KH wrote: > > > The kernel exported sysfs exports internal kernel implementation-details > > > and depends on internal kernel-structu

Re: Rules on how to use sysfs in userspace programs

2007-06-10 Thread Randy Dunlap
On Sun, 10 Jun 2007 10:02:00 -0400 Theodore Tso wrote: > On Fri, Jun 08, 2007 at 01:36:37PM -0700, Greg KH wrote: > > The kernel exported sysfs exports internal kernel implementation-details > > and depends on internal kernel-structures and layout. It is agreed upon > > kernel developers, that the

Re: Rules on how to use sysfs in userspace programs

2007-06-10 Thread Theodore Tso
On Fri, Jun 08, 2007 at 01:36:37PM -0700, Greg KH wrote: > The kernel exported sysfs exports internal kernel implementation-details > and depends on internal kernel-structures and layout. It is agreed upon > kernel developers, that the Linux kernel does not provide a stable > internal API. As sysf

Re: Rules on how to use sysfs in userspace programs

2007-06-09 Thread Jesper Juhl
On 08/06/07, Greg KH <[EMAIL PROTECTED]> wrote: Over time there have been a number of problems when sysfs has changed in "unexpected" ways. Here's a document that Kay wrote a while ago that I'd like to add to the kernel Documentation directory to help userspace programmers out. Any comments or

Re: Rules on how to use sysfs in userspace programs

2007-06-09 Thread Kay Sievers
On 6/9/07, Alexander E. Patrakov <[EMAIL PROTECTED]> wrote: Greg KH wrote: > - Do not use libsysfs > It makes assumptions about sysfs which are not true. Its API does not > offer any abstraction, it exposes all the kernel driver-core > implementation details in its own API. Therefore it is

Re: Rules on how to use sysfs in userspace programs

2007-06-09 Thread Alexander E. Patrakov
Greg KH wrote: - Do not use libsysfs It makes assumptions about sysfs which are not true. Its API does not offer any abstraction, it exposes all the kernel driver-core implementation details in its own API. Therefore it is not better than reading directories and opening the files yourself

Re: Rules on how to use sysfs in userspace programs

2007-06-09 Thread Jan Engelhardt
On Jun 8 2007 13:36, Greg KH wrote: > >Any comments or critique of this is greatly appreciated. > > > >Rules to access device-information in the Linux kernel sysfs > >The kernel exported sysfs exports internal kernel implementation-details >and depends on intern