mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-30 17:45:23 +00:00
uml: Report error if inotify fails on driver startup
(cherry picked from commit 7b97030ad4
)
This commit is contained in:
parent
741f004378
commit
8a57d799ca
@ -500,7 +500,8 @@ umlStartup(int privileged)
|
|||||||
if (virFileMakePath(uml_driver->monitorDir) < 0) {
|
if (virFileMakePath(uml_driver->monitorDir) < 0) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
VIR_ERROR(_("Failed to create monitor directory %s: %s"),
|
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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,6 +509,10 @@ umlStartup(int privileged)
|
|||||||
if (inotify_add_watch(uml_driver->inotifyFD,
|
if (inotify_add_watch(uml_driver->inotifyFD,
|
||||||
uml_driver->monitorDir,
|
uml_driver->monitorDir,
|
||||||
IN_CREATE | IN_MODIFY | IN_DELETE) < 0) {
|
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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user