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>
res = loopcxt_setup_device(&lc);
if (res == 0)
break; /* success */
- if (errno == EBUSY)
+ if (errno == EBUSY && !hasdev)
continue;
/* errors */