On Fri, Sep 30, 2011 at 12:05:26PM +0200, Petr Uzel wrote: > > Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx> > --- > mount/lomount.c | 45 +++++++++++++++++++++++++++++++++++++++++---- > mount/losetup.8 | 6 ++++++ > 2 files changed, 47 insertions(+), 4 deletions(-) > > diff --git a/mount/lomount.c b/mount/lomount.c > index 441860b..ae49157 100644 > --- a/mount/lomount.c > +++ b/mount/lomount.c > @@ -938,6 +938,32 @@ set_loop(const char *device, const char *file, unsigned long long offset, > return 0; > } > > +static int > +delete_all_devices (void) > +{ > + struct looplist ll; > + int fd; > + int ok; int ok = 0; :-) > + if (looplist_open(&ll, LLFLG_USEDONLY) == -1) { > + error(_("%s: /dev directory does not exist."), progname); > + return 1; > + } > + > + while((fd = looplist_next(&ll)) != -1) { > + close(fd); > + ok |= del_loop(ll.name); > + } [...] Applied, thanks. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html