Lines Matching refs:fd
39 int fd; in osdep_xencall_open() local
44 fd = open("/dev/xen/privcmd", O_RDWR|O_CLOEXEC); in osdep_xencall_open()
46 if ( fd == -1 && ( errno == ENOENT || errno == ENXIO || errno == ENODEV )) in osdep_xencall_open()
49 fd = open("/proc/xen/privcmd", O_RDWR|O_CLOEXEC); in osdep_xencall_open()
52 if ( fd == -1 ) in osdep_xencall_open()
58 xcall->fd = fd; in osdep_xencall_open()
63 fd = open("/dev/xen/hypercall", O_RDWR|O_CLOEXEC); in osdep_xencall_open()
64 if ( fd == -1 && errno != ENOENT ) in osdep_xencall_open()
69 xcall->buf_fd = fd; in osdep_xencall_open()
78 if ( xcall->fd >= 0 ) in osdep_xencall_close()
79 close(xcall->fd); in osdep_xencall_close()
85 return ioctl(xcall->fd, IOCTL_PRIVCMD_HYPERCALL, hypercall); in osdep_hypercall()