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:
parent
16568fd336
commit
5cad4c70e3
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user