1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

homework: s/EWOULDBLOCK/EAGAIN/

C.f. 012d7b4217420163db5752a63da6cab39d25edf3, ff55c3c7327e6ad8ab139aef52d498386d4f4a72,
ca2031fcc863fcdd4dd1594709918cb60cfd0e1b.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-03-22 14:05:37 +01:00
parent 16568fd336
commit 5cad4c70e3

View File

@ -1163,12 +1163,12 @@ static int lock_image_fd(int image_fd, const char *ip) {
if (flock(image_fd, LOCK_EX|LOCK_NB) < 0) {
if (errno == EWOULDBLOCK)
if (errno == EAGAIN)
log_error_errno(errno, "Image file '%s' already locked, can't use.", ip);
else
log_error_errno(errno, "Failed to lock image file '%s': %m", ip);
return errno != EWOULDBLOCK ? -errno : -EADDRINUSE; /* Make error recognizable */
return errno != EAGAIN ? -errno : -EADDRINUSE; /* Make error recognizable */
}
log_info("Successfully locked image file '%s'.", ip);