mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
system: make system functions return error on error
Return -errno from system functions instead of -1 in errors. This makes it easier to pass along the result without having to go to errno etc..
This commit is contained in:
parent
03eeb945f3
commit
5b7e95c71c
9 changed files with 154 additions and 157 deletions
|
|
@ -237,11 +237,12 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->source.fd = spa_system_eventfd_create(this->system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
this->source.mask = SPA_IO_IN;
|
||||
this->source.rmask = 0;
|
||||
if (this->source.fd != -1) {
|
||||
|
||||
if (this->source.fd < 0) {
|
||||
fprintf(stderr, "Warning: failed to create eventfd: %m");
|
||||
} else {
|
||||
spa_loop_add_source(loop, &this->source);
|
||||
this->have_source = true;
|
||||
} else {
|
||||
fprintf(stderr, "Warning: failed to create eventfd: %m");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue