calling sys_read inside sys_write returns number of bytes read as zero
Hi All,
I am intercepting sys_write system call and within my_sys_write i will call the original syswrite. Before calling the original sys_write, i have to get the contents of the file which will be replaced by the current write. So i open a new file descriptor inside my_sys_write and read the current buffer before calling the original sys_write. I have a problem in reading the current buffer using sys_read which returns zero . I am giving the relevant code below Code:
ssize_t my_sys_write(unsigned int fd, const char * buf, size_t count) |
All times are GMT -5. The time now is 11:19 PM. |