treewide: replace EBADFD with posix EBADF

EBADF was used in some places already, some other places used EBADFD
(with and without an #ifdef). EBADFD is linux specific.
This commit is contained in:
Wim Taymans 2026-05-27 13:36:39 +02:00
parent db8bb8d489
commit 7303a55b50
4 changed files with 12 additions and 16 deletions

View file

@ -586,7 +586,7 @@ static int device_write(struct impl *this, const void *data, uint32_t size)
res = compress_offload_api_write(this->device_context, data, num_bytes_to_write);
if (SPA_UNLIKELY(res < 0)) {
if (res == -EBADFD)
if (res == -EBADF)
spa_log_debug(this->log, "%p: device is paused", this);
else
spa_log_error(this->log, "%p: write error: %s", this, spa_strerror(res));

View file

@ -254,8 +254,8 @@ int compress_offload_api_write(struct compress_offload_api_context *context, con
num_bytes_written = write(context->fd, data, size);
if (num_bytes_written < 0) {
switch (errno) {
case EBADFD:
/* EBADFD indicates that the device is paused and thus is not an error. */
case EBADF:
/* EBADF indicates that the device is paused and thus is not an error. */
break;
default:
spa_log_error(context->log, "could not write %zu byte(s): %s (%d)",