]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/loopdev: Set errno in is_loopdev on error
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 30 Aug 2016 19:00:38 +0000 (21:00 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 31 Aug 2016 07:49:01 +0000 (09:49 +0200)
commitcb129d9cc4a2ae39ba2b678bc511ff81d5023850
tree9bd2787a9223de82f705fd384b48ee2b792f96ff
parent2480b52743409a09277ecae47259b57804232e25
lib/loopdev: Set errno in is_loopdev on error

The function is_loopdev does not set errno if the supplied string does
not reference a valid loop device. Fix this to avoid an error message
like this one:

  losetup: /: failed to use device: Success

I prefer this one:

  losetup: /: failed to use device: No such device

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/loopdev.c