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.
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index 0a04d15..50b08c8 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -120,7 +120,7 @@
}
/* vty might have been closed from vithin vty_read() */
- if (rc == -EBADFD)
+ if (rc == -EBADF)
return rc;
if (what & BSC_FD_WRITE) {
diff --git a/src/vty/vty.c b/src/vty/vty.c
index fc86bdf..10a323f 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1434,7 +1434,7 @@
/* 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);
diff --git a/src/write_queue.c b/src/write_queue.c
index 80e6c42..9a8b05c 100644
--- a/src/write_queue.c
+++ b/src/write_queue.c
@@ -46,13 +46,13 @@
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 @@
rc = queue->write_cb(fd, msg);
msgb_free(msg);
- if (rc == -EBADFD)
+ if (rc == -EBADF)
goto err_badfd;
if (!llist_empty(&queue->msg_queue))