pw-reserver: improve output a little

This commit is contained in:
Wim Taymans 2023-01-05 14:10:11 +01:00
parent 26496724c6
commit e099f0598a

View file

@ -214,21 +214,28 @@ int main(int argc, char *argv[])
if (!opt_monitor) {
res = rd_device_acquire(impl.device);
if (res == -EBUSY) {
printf("device %s is busy, use -r to attempt to release\n", opt_name);
printf("device %s is busy\n", opt_name);
if (opt_release) {
printf("doing RequestRelease on %s\n", opt_name);
res = rd_device_request_release(impl.device);
}
} else {
printf("use -r to attempt to release\n");
}
} else if (res < 0) {
printf("Device %s can not be acquired: %s\n", opt_name,
spa_strerror(res));
}
}
if (res >= 0)
pw_main_loop_run(impl.mainloop);
if (!opt_monitor)
if (!opt_monitor) {
if (opt_release) {
printf("doing Release on %s\n", opt_name);
rd_device_release(impl.device);
}
}
exit:
if (impl.conn)