Lines Matching refs:fd
31 int fd; in xenbus_evtchn() local
34 fd = open("/dev/xen/xenbus", O_RDONLY); in xenbus_evtchn()
35 if (fd == -1) in xenbus_evtchn()
38 port = ioctl(fd, IOCTL_XENBUS_XENSTORE_EVTCHN); in xenbus_evtchn()
40 close(fd); in xenbus_evtchn()
46 int fd; in xenbus_map() local
49 fd = open("/dev/xen/xenbus", O_RDWR); in xenbus_map()
50 if (fd == -1) in xenbus_map()
54 MAP_SHARED, fd, 0); in xenbus_map()
59 close(fd); in xenbus_map()
66 int fd; in xenbus_notify_running() local
68 fd = open("/dev/xen/xenbus", O_RDONLY); in xenbus_notify_running()
70 (void) ioctl(fd, IOCTL_XENBUS_NOTIFY_UP); in xenbus_notify_running()
72 close(fd); in xenbus_notify_running()
83 if (getpeerucred(conn->fd, &ucred) == -1) in cred()