mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-19 13:09:39 -07:00
Print error on Setsu open failure
This commit is contained in:
parent
abc9a27208
commit
20c54b05ad
1 changed files with 4 additions and 0 deletions
|
@ -309,7 +309,11 @@ SetsuDevice *setsu_connect(Setsu *setsu, const char *path, SetsuDeviceType type)
|
||||||
|
|
||||||
dev->fd = open(dev->path, O_RDONLY | O_NONBLOCK);
|
dev->fd = open(dev->path, O_RDONLY | O_NONBLOCK);
|
||||||
if(dev->fd == -1)
|
if(dev->fd == -1)
|
||||||
|
{
|
||||||
|
SETSU_LOG("Failed to open %s\n", dev->path);
|
||||||
|
perror("setsu_connect");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if(libevdev_new_from_fd(dev->fd, &dev->evdev) < 0)
|
if(libevdev_new_from_fd(dev->fd, &dev->evdev) < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue