From e2e86cf5ef145e96937113e88336ff34e1d75877 Mon Sep 17 00:00:00 2001 From: Hyunbin Lee Date: Mon, 3 Jun 2013 11:50:30 +0900 Subject: [PATCH] Remove Prevent defect Change-Id: I15788153f06490c643b27efa8785185bfdd86b80 Signed-off-by: Hyunbin Lee --- src/io/FIo_FileEventDispatcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io/FIo_FileEventDispatcher.cpp b/src/io/FIo_FileEventDispatcher.cpp index 3987029..f95fa46 100644 --- a/src/io/FIo_FileEventDispatcher.cpp +++ b/src/io/FIo_FileEventDispatcher.cpp @@ -209,7 +209,8 @@ _FileEventDispatcher::SendEvent(void) char buffer[INOTIFY_BUFFER_LEN + 1] = { 0, }; ssize_t length = read(__inotifyFd, buffer, INOTIFY_BUFFER_LEN); - SysTryReturnResult(NID_IO, length < (long)INOTIFY_BUFFER_LEN, E_IO, "Read buffer has failed."); + SysTryReturnResult(NID_IO, length >= 0 && length < (long)INOTIFY_BUFFER_LEN, E_IO, + "Failed to read inotify buffer. errno: %d (%s)", errno, strerror(errno)); unsigned long iter = 0; while (iter < static_cast< unsigned long >(length)) -- 2.7.4