]> git.ipfire.org Git - thirdparty/util-linux.git/commit
losetup: wait for udev
authorKarel Zak <kzak@redhat.com>
Fri, 24 Jan 2014 12:58:40 +0000 (13:58 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 24 Jan 2014 12:58:40 +0000 (13:58 +0100)
commit663bf040611240d164f2464b4d892ecd2b02fa6f
tree35dcd9192bb4ecd16e668d39fdcd1f61d71c3e75
parenta5bd7939961aaa6e39f3b298e556063cfd97d75a
losetup: wait for udev

On system with /dev/lop-control the udevd creates /dev/loopN nodes.
It seems better to wait a moment after unsuccessful open(/dev/loopN)
and try it to open again.

The problem is pretty visible on systems where udevd also modifies
permission for loopN devices, then open() fails with EACCES when
losetup executed by non-root user (but user who is in "disk" group).

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1045432
Signed-off-by: Karel Zak <kzak@redhat.com>
include/loopdev.h
lib/loopdev.c