From d6ef7d6c69201190d9623885d418f9bdcf31642e Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Tue, 27 May 2014 20:38:17 +0200 Subject: 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 Signed-off-by: Stanislav Brabec --- sys-utils/losetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/losetup.c') 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 */ -- cgit v1.2.3-55-g7522