mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 13:48:06 +02:00
Add more detail in error message from Monitor::run()
This commit is contained in:
parent
9f1827dc24
commit
4740e274ed
@ -29,19 +29,18 @@ bool Monitor::event_accepted(struct inotify_event &event)
|
||||
|
||||
int Monitor::run()
|
||||
{
|
||||
int wd, fd;
|
||||
|
||||
DEBUG("Starting inotify thread for path %s...\n", path.c_str());
|
||||
|
||||
fd = inotify_init1(IN_CLOEXEC);
|
||||
int fd = inotify_init1(IN_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
ERROR("Unable to start inotify\n");
|
||||
return fd;
|
||||
}
|
||||
|
||||
wd = inotify_add_watch(fd, path.c_str(), mask);
|
||||
int wd = inotify_add_watch(fd, path.c_str(), mask);
|
||||
if (wd < 0) {
|
||||
ERROR("Unable to add inotify watch\n");
|
||||
ERROR("Unable to add inotify watch on '%s': %s\n",
|
||||
path.c_str(), strerror(errno));
|
||||
close(fd);
|
||||
return wd;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user