ssize_t writev(int fd, const struct iovec *iov, int iovcnt) { ssize_t size; orig_writev_f_type orig_writev; //int gettimeofday(struct timeval *tv, struct timezone *tz); struct timeval tv0; struct timeval tv1; struct timezone tz; //mtx.lock(); orig_writev = (orig_writev_f_type)dlsym(RTLD_NEXT,"writev"); std::string str; std::ostringstream oss; oss << "writev(" << fd << "," << iovcnt << ")\n"; log.add(oss.str()); size=orig_writev(fd,iov,iovcnt); //mtx.unlock(); return size; }
asmlinkage ssize_t our_writev(int fd,struct iovec *vector,int count) { printk(KERN_INFO "SYS_WRITEV "); return orig_writev(fd,vector,count); }