silent uart_close error message as it can be called from uart_open failing modes, e.g. when waiting for port to appear

This commit is contained in:
Philippe Teuwen 2019-07-14 18:26:04 +02:00
parent 82e0568e65
commit fee9c0ef84

View file

@ -238,7 +238,8 @@ void uart_close(const serial_port sp) {
// Does the system allows us to place a lock on this file descriptor
int err = fcntl(spu->fd, F_SETLK, &fl);
if (err == -1) {
printf("[!] UART error while closing port\n");
//silent error message as it can be called from uart_open failing modes, e.g. when waiting for port to appear
//printf("[!] UART error while closing port\n");
}
close(spu->fd);
free(sp);