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
* Adrian Almenar ([email protected]) 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
Adrian Almenar <[email protected]> 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, [email protected]
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."
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
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>>