diff options
author | Stanislav Brabec | 2014-05-27 20:38:17 +0200 |
---|---|---|
committer | Karel Zak | 2014-05-28 09:18:40 +0200 |
commit | d6ef7d6c69201190d9623885d418f9bdcf31642e (patch) | |
tree | b8a3000fffef268eefcf1388f27ff73c13ebf7cc /sys-utils | |
parent | losetup: don't clear FD at EBUSY error in loopcxt_setup_device() (diff) | |
download | kernel-qcow2-util-linux-d6ef7d6c69201190d9623885d418f9bdcf31642e.tar.gz kernel-qcow2-util-linux-d6ef7d6c69201190d9623885d418f9bdcf31642e.tar.xz kernel-qcow2-util-linux-d6ef7d6c69201190d9623885d418f9bdcf31642e.zip |
losetup: don't ignore EBUSY in losetup when the loop device is given
losetup ignores the EBUSY error. In the loop fo A_CREATE action, it skips
the error handling when errno = EBUSY. It's OK for the case where no loop
device is specified, but the error has to be handled when the device is given
explicitly.
Author: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/losetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index f6b8685a3..ecba8a56c 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -662,7 +662,7 @@ int main(int argc, char **argv) res = loopcxt_setup_device(&lc); if (res == 0) break; /* success */ - if (errno == EBUSY) + if (errno == EBUSY && !hasdev) continue; /* errors */ |