[libvirt] [PATCH] uml: Report error if inotify fails on driver startup

--- Someone at KVM forum was actually hitting an error here, since their system had exceeded the max number of inotify watches somehow. src/uml/uml_driver.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 7eedaf1..887dca6 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -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; } -- 1.8.0.1

On 12/09/2012 02:44 PM, Peter Krempa wrote:
On 12/09/12 02:48, Cole Robinson wrote:
--- Someone at KVM forum was actually hitting an error here, since their system had exceeded the max number of inotify watches somehow.
src/uml/uml_driver.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
ACK
Peter
Thanks Peter, pushed now. - Cole
participants (2)
-
Cole Robinson
-
Peter Krempa