Lines Matching defs:fd1
126 static inline int sync_merge(const char *name, int fd1, int fd2)
135 ret = ioctl(fd1, SYNC_IOC_MERGE, &data);
156 /* accumulate fd2 into fd1. If *fd1 is not a valid fd then dup fd2,
157 * otherwise sync_merge() and close the old *fd1. This can be used
173 static inline int sync_accumulate(const char *name, int *fd1, int fd2)
179 if (*fd1 < 0) {
180 *fd1 = dup(fd2);
184 ret = sync_merge(name, *fd1, fd2);
186 /* leave *fd1 as it is */
190 close(*fd1);
191 *fd1 = ret;