Lines Matching defs:fd
157 int fd;
159 while ((fd = open(path, oflag)) == -1 && errno == EAGAIN)
162 return (fd);
169 int fd;
185 if ((fd = blocking_open("/devices/pseudo/devinfo@0:devinfo",
191 if (ioctl(fd, DINFOLODRV, driver) != 0) {
193 (void) close(fd);
197 (void) close(fd);
210 int fd, map_size;
259 if ((fd = blocking_open("/devices/pseudo/devinfo@0:devinfo",
274 if ((fd = blocking_open("/devices/pseudo/devinfo@0:devinfo,ro",
286 if (ioctl(fd, DINFOIDENT, NULL) != DI_MAGIC) {
289 (void) close(fd);
296 if ((map_size = ioctl(fd, flag, &dinfo_io)) < 0) {
299 (void) close(fd);
304 (void) close(fd);
314 (void) close(fd);
318 if (ioctl(fd, DINFOUSRLD, pa) != map_size) {
320 (void) close(fd);
326 (void) close(fd);
3061 mutex_t lock; /* synchronize access to openprom fd */
3062 int fd; /* /dev/openprom file descriptor */
3081 if ((p->fd = open("/dev/openprom", O_RDONLY)) < 0) {
3115 (void) close(p->fd);
3142 if (ioctl(p->fd, OPROMSETNODEID, opp) < 0) {
3154 if ((ioctl(p->fd, OPROMNXTPROP, opp) < 0) || (opp->oprom_size == 0))
3177 if ((ioctl(p->fd, OPROMGETPROP, opp) < 0) ||
3305 if (ioctl(p->fd, OPROMSETNODEID, opp) < 0) {
3320 if ((ioctl(p->fd, OPROMGETPROPLEN, opp) < 0) ||
3352 if ((ioctl(p->fd, OPROMGETPROP, opp) < 0) ||