mirror of https://gitee.com/openkylin/libvirt.git
uml: Report error if inotify fails on driver startup
This commit is contained in:
parent
d13155c20c
commit
7b97030ad4
|
@ -509,7 +509,8 @@ umlStartup(bool privileged,
|
|||
if (virFileMakePath(uml_driver->monitorDir) < 0) {
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("Failed to create monitor directory %s: %s"),
|
||||
uml_driver->monitorDir, virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
uml_driver->monitorDir,
|
||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -517,6 +518,10 @@ umlStartup(bool privileged,
|
|||
if (inotify_add_watch(uml_driver->inotifyFD,
|
||||
uml_driver->monitorDir,
|
||||
IN_CREATE | IN_MODIFY | IN_DELETE) < 0) {
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("Failed to create inotify watch on %s: %s"),
|
||||
uml_driver->monitorDir,
|
||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue