mirror of https://gerrit.osmocom.org/libosmocore
write_queue: Use EBADF instead of EBABDFD for portability
EBADFD is linux specific while EBADF is POSIX. Fix the build on FreeBSD and use EBADF throughout the file.
This commit is contained in:
parent
77ab2f723e
commit
eb55e6aa88
|
@ -120,7 +120,7 @@ static int client_data(struct osmo_fd *fd, unsigned int what)
|
|||
}
|
||||
|
||||
/* vty might have been closed from vithin vty_read() */
|
||||
if (rc == -EBADFD)
|
||||
if (rc == -EBADF)
|
||||
return rc;
|
||||
|
||||
if (what & BSC_FD_WRITE) {
|
||||
|
|
|
@ -1434,7 +1434,7 @@ int vty_read(struct vty *vty)
|
|||
/* Check status. */
|
||||
if (vty->status == VTY_CLOSE) {
|
||||
vty_close(vty);
|
||||
return -EBADFD;
|
||||
return -EBADF;
|
||||
} else {
|
||||
vty_event(VTY_WRITE, vty_sock, vty);
|
||||
vty_event(VTY_READ, vty_sock, vty);
|
||||
|
|
|
@ -46,13 +46,13 @@ int osmo_wqueue_bfd_cb(struct osmo_fd *fd, unsigned int what)
|
|||
|
||||
if (what & BSC_FD_READ) {
|
||||
rc = queue->read_cb(fd);
|
||||
if (rc == -EBADFD)
|
||||
if (rc == -EBADF)
|
||||
goto err_badfd;
|
||||
}
|
||||
|
||||
if (what & BSC_FD_EXCEPT) {
|
||||
rc = queue->except_cb(fd);
|
||||
if (rc == -EBADFD)
|
||||
if (rc == -EBADF)
|
||||
goto err_badfd;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ int osmo_wqueue_bfd_cb(struct osmo_fd *fd, unsigned int what)
|
|||
rc = queue->write_cb(fd, msg);
|
||||
msgb_free(msg);
|
||||
|
||||
if (rc == -EBADFD)
|
||||
if (rc == -EBADF)
|
||||
goto err_badfd;
|
||||
|
||||
if (!llist_empty(&queue->msg_queue))
|
||||
|
|
Loading…
Reference in New Issue