Assuming one uses a non-trivial number of loop devices (e.g. > 10) any of the devices beyond '/dev/loop9' do not get reported when using 'losetup' to get a list of ALL (!!) loop devices that are currently in use. Likewise if the next free loop device is beyond '/dev/loop9' nothing will be reported when using 'losetup -f' to find out the next free loop device. I guess this bug is a consequence of the following code snippet from 'util-linux/losetup.c': if (++dev[sizeof(dev) - 2] > '9') break; I have to admit that I have done no tests to confirm or deny this hunch. I'm a user of TinyCoreLinux, which relies on BusyBox to a large degree. Due to the heavy use of loop mounting a lot of loop devices can be in use and it's a pity that 'losetup' can't be used to the obtain proper information.
Fixed in git: http://git.busybox.net/busybox/diff/?id=92510141e24251a1d72fbdeef4e2ed2b2b25b433&id2=42c4b2e3b535314ae8a7b65c3223afb26872d5a2 Thanks!