On Thu, Nov 01, 2007 at 09:50:36PM +0100, [EMAIL PROTECTED] wrote:
> > Read the code. It doesn't check for all devices in range 0..256 -- it
> > breaks the for() loop when a /dev/loopN doesn't exist. For example on
> > my system it doesn't check for more than nine device. I don't see a
> > problem with a huge limit.
>
> ah, ok - thanks for explaining.
> but, anyway - it`s a little bit weird that it stops checking if
> there is a "gap" in between.
Yes, "gaps" are problem. I think we can try to use /sys/block/loop*
for "losetup -a" and opendir("/dev") + readdir() for "losetup -f".
That's probably better than blindly try to call stat(2) for all
possible loop devices. I'll prepare a patch next week.
Karel
--
Karel Zak <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html