[PATCH] losetup: Create loop device if it does not exist

Joerg Vehlow lkml at jv-coder.de
Mon Oct 28 06:26:10 UTC 2019



Am 23.10.2019 um 20:39 schrieb Stefan Seyfried:
> Am 22.10.19 um 10:49 schrieb Joerg Vehlow:
>> No interest in util-linux compatibility?
> Is util-linux really creating the device node?
>
> I thought it would use the current /dev/loop-control API and request a
> new device from the kernel, which then is created via udev.
>
You are right. I didn't think about udev, just saw different behavior.
But in the end I think it doesn't really matter if udev or losetup creates
the device. Losetup expects the device to be created somwhere in
/.../loop#### anyway (with the path given by the caller). If the path 
was wrong,
but still ended in /loop####, the device is created using the 
loop-control and
not used afterwards. I am not sure what the upside of using udev is here.

But as far as compatibility is concerned, it would probably be better, if
busybox uses loop-control with LOOP_CTL_ADD as well.

Jörg


More information about the busybox mailing list