Try to degrade gracefully if inotify is unavailable
parent
3e3397ccb9
commit
3b5afee8db
|
@ -18,6 +18,8 @@ const char *vm_executable_path(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SYS_inotify_init
|
||||||
|
|
||||||
int inotify_init(void)
|
int inotify_init(void)
|
||||||
{
|
{
|
||||||
return syscall(SYS_inotify_init);
|
return syscall(SYS_inotify_init);
|
||||||
|
@ -32,3 +34,25 @@ int inotify_rm_watch(int fd, u32 wd)
|
||||||
{
|
{
|
||||||
return syscall(SYS_inotify_rm_watch, fd, wd);
|
return syscall(SYS_inotify_rm_watch, fd, wd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int inotify_init(void)
|
||||||
|
{
|
||||||
|
not_implemented_error();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int inotify_add_watch(int fd, const char *name, u32 mask)
|
||||||
|
{
|
||||||
|
not_implemented_error();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int inotify_rm_watch(int fd, u32 wd)
|
||||||
|
{
|
||||||
|
not_implemented_error();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue