From: Liu Yuan <[email protected]>

Signed-off-by: Liu Yuan <[email protected]>
---
 collie/debug.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/collie/debug.c b/collie/debug.c
index ace5737..83dbf8f 100644
--- a/collie/debug.c
+++ b/collie/debug.c
@@ -168,6 +168,9 @@ static int trace_cat(int argc, char **argv)
                return EXIT_SYSFAIL;
        }
 
+       if (st.st_size == 0)
+               return EXIT_SUCCESS;
+
        map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
        close(fd);
        if (map == MAP_FAILED) {
-- 
1.7.9.5

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to