[PATCH] losetup -f

Denys Vlasenko vda.linux at googlemail.com
Sun Sep 23 19:25:05 UTC 2007


On Friday 21 September 2007 08:59, Loïc Grenié wrote:
>     This is a trivial patch to add a -f option to losetup. losetup -f shows the
>   first free loop device. After the patch executable size is not changed in
>   two of three arch that I've tested:
> 
>      AMD64: unchanged
>      i386: unchanged
>      i386: +4060bytes (different version of gcc)
> 
>   The code is incorrect if 1) there are less than 10 loop devices and 2) they
>   are all busy (but I don't know loop devices enough to correct...).
> 
>     I use a custom version of ubuntu initrd using busybox 1.6.1 for nearly all
>   executables (resulting in a 700kb smaller initrd.gz). losetup -f is
> used during the boot, so that it'd be better if it got included in busybox.

Sorry for late reply.

Your patch doesn't apply to current svn. Please rediff.
I am attaching current svn's losetup.c to make it easier.

Please use diff -u.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: losetup.c
Type: text/x-csrc
Size: 1347 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070923/d023d133/attachment-0002.c 


More information about the busybox mailing list