Lines Matching refs:fd
88 lock.fd = hnd->genlockHandle;
93 "err=%s fd=%d)", __FUNCTION__,
94 lockType, strerror(errno), hnd->fd);
103 ALOGE("%s: GENLOCK_IOC_LOCK failed (lockType0x%x, err=%s fd=%d)"
104 ,__FUNCTION__, lockType, strerror(errno), hnd->fd);
116 /* Internal function to close the fd and release the handle */
117 void close_genlock_fd_and_handle(int& fd, int& handle)
119 if (fd >=0 ) {
120 close(fd);
121 fd = -1;
149 int fd = open(GENLOCK_DEVICE, O_RDWR);
150 if (fd < 0) {
158 if (ioctl(fd, GENLOCK_IOC_NEW, NULL)) {
161 close_genlock_fd_and_handle(fd, lock.fd);
167 if (ioctl(fd, GENLOCK_IOC_EXPORT, &lock)) {
170 close_genlock_fd_and_handle(fd, lock.fd);
176 hnd->genlockPrivFd = fd;
177 hnd->genlockHandle = lock.fd;
208 // Close the fd and reset the parameters.
234 int fd = open(GENLOCK_DEVICE, O_RDWR);
235 if (fd < 0) {
243 lock.fd = hnd->genlockHandle;
244 if (ioctl(fd, GENLOCK_IOC_ATTACH, &lock)) {
247 close_genlock_fd_and_handle(fd, lock.fd);
252 hnd->genlockPrivFd = fd;
335 lock.fd = hnd->genlockHandle;