public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs directories...
@ 2004-06-18 19:51 Adrian Almenar
  2004-06-18 20:27 ` Chris Wright
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Adrian Almenar @ 2004-06-18 19:51 UTC (permalink / raw)
  To: linux-kernel

i was looking at /sys on my machine yesterday and i found something
strange.

cd
/sys/block/hda/device/block/device/block/device/block/device/block/...
and that continues being almost infinite and recursive, it is normal
???

My Kernel Version is: 2.6.7-rc3

Cheers,

-- 
Adrian Almenar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs directories...
  2004-06-18 19:51 sysfs directories Adrian Almenar
@ 2004-06-18 20:27 ` Chris Wright
  2004-06-18 21:54 ` Andreas Schwab
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chris Wright @ 2004-06-18 20:27 UTC (permalink / raw)
  To: Adrian Almenar; +Cc: linux-kernel

* Adrian Almenar (aalmenar@conectium.com) wrote:
> i was looking at /sys on my machine yesterday and i found something
> strange.
> 
> cd
> /sys/block/hda/device/block/device/block/device/block/device/block/...
> and that continues being almost infinite and recursive, it is normal

Both /sys/block/hda/device and the next element 'block' are symlinks,
so it'll top out after 40 (enforced by vfs).

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs directories...
  2004-06-18 19:51 sysfs directories Adrian Almenar
  2004-06-18 20:27 ` Chris Wright
@ 2004-06-18 21:54 ` Andreas Schwab
  2004-06-18 22:44 ` Greg KH
  2004-06-19  8:02 ` V13
  3 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2004-06-18 21:54 UTC (permalink / raw)
  To: Adrian Almenar; +Cc: linux-kernel

Adrian Almenar <aalmenar@conectium.com> writes:

> i was looking at /sys on my machine yesterday and i found something
> strange.
>
> cd
> /sys/block/hda/device/block/device/block/device/block/device/block/...
> and that continues being almost infinite and recursive, it is normal
> ???

Consult your favourite Unix textbook and look up "symbolic links".  Then
look again at /sys/block/hda/device.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs directories...
  2004-06-18 19:51 sysfs directories Adrian Almenar
  2004-06-18 20:27 ` Chris Wright
  2004-06-18 21:54 ` Andreas Schwab
@ 2004-06-18 22:44 ` Greg KH
  2004-06-19  8:02 ` V13
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-06-18 22:44 UTC (permalink / raw)
  To: Adrian Almenar; +Cc: linux-kernel

On Fri, Jun 18, 2004 at 03:51:17PM -0400, Adrian Almenar wrote:
> i was looking at /sys on my machine yesterday and i found something
> strange.
> 
> cd
> /sys/block/hda/device/block/device/block/device/block/device/block/...
> and that continues being almost infinite and recursive, it is normal
> ???

What does:
	ls -l /sys/block/hda

show?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sysfs directories...
  2004-06-18 19:51 sysfs directories Adrian Almenar
                   ` (2 preceding siblings ...)
  2004-06-18 22:44 ` Greg KH
@ 2004-06-19  8:02 ` V13
  3 siblings, 0 replies; 5+ messages in thread
From: V13 @ 2004-06-19  8:02 UTC (permalink / raw)
  To: Adrian Almenar; +Cc: linux-kernel

On Friday 18 June 2004 22:51, Adrian Almenar wrote:
> i was looking at /sys on my machine yesterday and i found something
> strange.
>
> cd
> /sys/block/hda/device/block/device/block/device/block/device/block/...
> and that continues being almost infinite and recursive, it is normal
> ???

It's a bash trick when changing dir to a symlink:

hell:/sys/block/hda$ cd device
hell:/sys/block/hda/device$ cd block
hell:/sys/block/hda/device/block$ cd device
hell:/sys/block/hda/device/block/device$ cd block
hell:/sys/block/hda/device/block/device/block$ pwd
/sys/block/hda/device/block/device/block
hell:/sys/block/hda/device/block/device/block$ /bin/pwd
/sys/block/hda
hell:/sys/block/hda/device/block/device/block/device$ pwd
/sys/block/hda/device/block/device/block/device
hell:/sys/block/hda/device/block/device/block/device$ /bin/pwd
/sys/devices/pci0000:00/0000:00:04.1/ide0/0.0

<<V13>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-06-19  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-18 19:51 sysfs directories Adrian Almenar
2004-06-18 20:27 ` Chris Wright
2004-06-18 21:54 ` Andreas Schwab
2004-06-18 22:44 ` Greg KH
2004-06-19  8:02 ` V13

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox