]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/loopdev: check for /sys
authorKarel Zak <kzak@redhat.com>
Wed, 17 Oct 2012 09:43:39 +0000 (11:43 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 17 Oct 2012 09:51:10 +0000 (11:51 +0200)
commitdf0f2ad7633b3e2cc830298239cbaaa656e724cd
tree40646b1d76974de64e966dc60948ef2265e4fd82
parentf4bf95926a5a4cda9328154f3804f0b6f542897d
lib/loopdev: check for /sys

The current loopdev code prefers /sys to get information about
loop devices. The old methods like scan /dev are fallback solution
only. Unfortunately, the code does not check if /sys is mounted.

Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/loopdev.c