Lines Matching defs:fd1
132 static inline int sync_merge(const char *name, int fd1, int fd2)
141 ret = ioctl(fd1, SYNC_IOC_MERGE, &data);
162 /* accumulate fd2 into fd1. If *fd1 is not a valid fd then dup fd2,
163 * otherwise sync_merge() and close the old *fd1. This can be used
179 static inline int sync_accumulate(const char *name, int *fd1, int fd2)
185 if (*fd1 < 0) {
186 *fd1 = dup(fd2);
190 ret = sync_merge(name, *fd1, fd2);
192 /* leave *fd1 as it is */
196 close(*fd1);
197 *fd1 = ret;