Re: sysfs root link count broken in 2.6.22-git5

2007-07-19 Thread Jan Engelhardt
On Jul 19 2007 10:41, Jean Delvare wrote: >> Well, just check if /sys/devices/ exists, that should be cheap enough. :) > >Yes, this is a possibility, and one I had considered at first. But I >wasn't sure which subdirectory to check. sysfs isn't well known for its >stability, and I didn't know

Re: sysfs root link count broken in 2.6.22-git5

2007-07-19 Thread Jean Delvare
Hi Andreas, On Wed, 18 Jul 2007 22:12:52 +0200, Andreas Schwab wrote: > Jean Delvare <[EMAIL PROTECTED]> writes: > > Maybe getmntent(3)? Sure I could use this, but how expensive compared > > to a single stat(2). > > How about comparing the device numbers of /sys and its parent? If they > are

Re: sysfs root link count broken in 2.6.22-git5

2007-07-19 Thread Jean Delvare
Hi Kay, On Thu, 19 Jul 2007 02:44:54 +0200, Kay Sievers wrote: > On 7/18/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > > On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: > > > On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: > > > > The code looks like: > > > > > > > >if

Re: sysfs root link count broken in 2.6.22-git5

2007-07-19 Thread Jean Delvare
Hi Kay, On Thu, 19 Jul 2007 02:44:54 +0200, Kay Sievers wrote: On 7/18/07, Jean Delvare [EMAIL PROTECTED] wrote: On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: The code looks like: if

Re: sysfs root link count broken in 2.6.22-git5

2007-07-19 Thread Jean Delvare
Hi Andreas, On Wed, 18 Jul 2007 22:12:52 +0200, Andreas Schwab wrote: Jean Delvare [EMAIL PROTECTED] writes: Maybe getmntent(3)? Sure I could use this, but how expensive compared to a single stat(2). How about comparing the device numbers of /sys and its parent? If they are different

Re: sysfs root link count broken in 2.6.22-git5

2007-07-19 Thread Jan Engelhardt
On Jul 19 2007 10:41, Jean Delvare wrote: Well, just check if /sys/devices/ exists, that should be cheap enough. :) Yes, this is a possibility, and one I had considered at first. But I wasn't sure which subdirectory to check. sysfs isn't well known for its stability, and I didn't know which

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Kay Sievers
On 7/18/07, Jean Delvare <[EMAIL PROTECTED]> wrote: On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: > On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: > > This breaks libsensors. libsensors uses libsysfs, and libsysfs is not > > very smart in that it will initialize successfully

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Oliver Pinter
On 7/18/07, Jean Delvare <[EMAIL PROTECTED]> wrote: Hi Greg, On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: > On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: > > This breaks libsensors. libsensors uses libsysfs, and libsysfs is not > > very smart in that it will initialize

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Andreas Schwab
Jean Delvare <[EMAIL PROTECTED]> writes: > On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: >>Isn't there some glibc >> function that can detect the mount point of a filesystem or directory? >> Something in glibc parses /proc/mounts for something, I

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Jean Delvare
Hi Greg, On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: > On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: > > This breaks libsensors. libsensors uses libsysfs, and libsysfs is not > > very smart in that it will initialize successfully even if sysfs is not > > mounted. > >

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Greg KH
On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: > On Tue, 17 Jul 2007 11:36:52 -0700, Greg KH wrote: > > On Tue, Jul 17, 2007 at 01:12:55PM +0200, Jean Delvare wrote: > > > On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: > > > > On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Greg KH
On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: On Tue, 17 Jul 2007 11:36:52 -0700, Greg KH wrote: On Tue, Jul 17, 2007 at 01:12:55PM +0200, Jean Delvare wrote: On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote:

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Jean Delvare
Hi Greg, On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: This breaks libsensors. libsensors uses libsysfs, and libsysfs is not very smart in that it will initialize successfully even if sysfs is not mounted. libsysfs isn't

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Andreas Schwab
Jean Delvare [EMAIL PROTECTED] writes: On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: Isn't there some glibc function that can detect the mount point of a filesystem or directory? Something in glibc parses /proc/mounts for something, I can't

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Oliver Pinter
On 7/18/07, Jean Delvare [EMAIL PROTECTED] wrote: Hi Greg, On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: This breaks libsensors. libsensors uses libsysfs, and libsysfs is not very smart in that it will initialize

Re: sysfs root link count broken in 2.6.22-git5

2007-07-18 Thread Kay Sievers
On 7/18/07, Jean Delvare [EMAIL PROTECTED] wrote: On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote: On Tue, Jul 17, 2007 at 11:05:30PM +0200, Jean Delvare wrote: This breaks libsensors. libsensors uses libsysfs, and libsysfs is not very smart in that it will initialize successfully even if

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Tejun Heo
Hello, Sorry about late response. -EWASPUBLICHOLIDAY. That's something I've broken apparently. Will fix soon. Thanks. -- tejun - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Jean Delvare
On Tue, 17 Jul 2007 11:36:52 -0700, Greg KH wrote: > On Tue, Jul 17, 2007 at 01:12:55PM +0200, Jean Delvare wrote: > > On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: > > > On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: > > > > I'm running 2.6.22-git5 and noticed that the link

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Greg KH
On Tue, Jul 17, 2007 at 01:12:55PM +0200, Jean Delvare wrote: > Hi Greg, > > On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: > > On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: > > > I'm running 2.6.22-git5 and noticed that the link count of the sysfs > > > root is broken: > > >

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Jean Delvare
Hi Greg, On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: > On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: > > I'm running 2.6.22-git5 and noticed that the link count of the sysfs > > root is broken: > > > > $ ls -ld /sys > > drwxr-xr-x 2 root root 0 Jul 15 12:27 /sys > > > >

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Jean Delvare
Hi Greg, On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: I'm running 2.6.22-git5 and noticed that the link count of the sysfs root is broken: $ ls -ld /sys drwxr-xr-x 2 root root 0 Jul 15 12:27 /sys sysfs is

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Greg KH
On Tue, Jul 17, 2007 at 01:12:55PM +0200, Jean Delvare wrote: Hi Greg, On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: I'm running 2.6.22-git5 and noticed that the link count of the sysfs root is broken: $ ls -ld

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Jean Delvare
On Tue, 17 Jul 2007 11:36:52 -0700, Greg KH wrote: On Tue, Jul 17, 2007 at 01:12:55PM +0200, Jean Delvare wrote: On Mon, 16 Jul 2007 20:48:44 -0700, Greg KH wrote: On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: I'm running 2.6.22-git5 and noticed that the link count of the

Re: sysfs root link count broken in 2.6.22-git5

2007-07-17 Thread Tejun Heo
Hello, Sorry about late response. -EWASPUBLICHOLIDAY. That's something I've broken apparently. Will fix soon. Thanks. -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: sysfs root link count broken in 2.6.22-git5

2007-07-16 Thread Greg KH
On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: > Hi Tejun, hi Greg, > > I'm running 2.6.22-git5 and noticed that the link count of the sysfs > root is broken: > > $ ls -ld /sys > drwxr-xr-x 2 root root 0 Jul 15 12:27 /sys > > sysfs is mounted, the link count should be 11, and is

Re: sysfs root link count broken in 2.6.22-git5

2007-07-16 Thread Greg KH
On Sun, Jul 15, 2007 at 12:42:32PM +0200, Jean Delvare wrote: Hi Tejun, hi Greg, I'm running 2.6.22-git5 and noticed that the link count of the sysfs root is broken: $ ls -ld /sys drwxr-xr-x 2 root root 0 Jul 15 12:27 /sys sysfs is mounted, the link count should be 11, and is with

sysfs root link count broken in 2.6.22-git5

2007-07-15 Thread Jean Delvare
Hi Tejun, hi Greg, I'm running 2.6.22-git5 and noticed that the link count of the sysfs root is broken: $ ls -ld /sys drwxr-xr-x 2 root root 0 Jul 15 12:27 /sys sysfs is mounted, the link count should be 11, and is with kernel 2.6.22.1. find(1) complains about the bad link count. I suppose

sysfs root link count broken in 2.6.22-git5

2007-07-15 Thread Jean Delvare
Hi Tejun, hi Greg, I'm running 2.6.22-git5 and noticed that the link count of the sysfs root is broken: $ ls -ld /sys drwxr-xr-x 2 root root 0 Jul 15 12:27 /sys sysfs is mounted, the link count should be 11, and is with kernel 2.6.22.1. find(1) complains about the bad link count. I suppose