[FIX] read and write for non regular/socket fd
authorNikita Kalyazin <n.kalyazin@samsung.com>
Fri, 1 Nov 2013 07:36:49 +0000 (11:36 +0400)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 1 Nov 2013 13:17:18 +0000 (13:17 +0000)
This concerns the situation of invalid fd.  fstat also returns false
(regular/socket fd) in such cases.

Change-Id: I3af55ad524ce2e0d19b7e298a224e736af3a30bc
Signed-off-by: Nikita Kalyazin <n.kalyazin@samsung.com>
probe_file/da_io.h

index c91063c..bd10f0c 100755 (executable)
@@ -174,8 +174,8 @@ static inline bool stat_regular_or_socket_p(struct stat *buf)
                PACK_COMMON_END(0, 0, blockresult);                                             \
                PACK_RESOURCE(0, FD, APITYPE, _filesize, _filepath);                            \
                FLUSH_LOCAL_BUF();                                                              \
-               PRE_PROBEBLOCK_END();                                                           \
-       }
+       }                                                               \
+       PRE_PROBEBLOCK_END();
 
 
 #define AFTER_ORIGINAL_START_END_FD(API_ID, RVAL, SIZE, FD, APITYPE, INPUTFORMAT, ...)         \