Lines Matching refs:fd
178 int i, idx, fd;
235 fd = open(path_buf, O_RDWR);
236 if (fd < 0) {
245 * libc can't handle fd's greater than 255, in order to
246 * ensure that these values remain available make fd > 255.
249 tmpfd = fcntl(fd, F_DUPFD, 256);
254 (void) close(fd);
255 fd = tmpfd;
259 if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) {
262 (void) close(fd);
271 MAP_SHARED, fd, uarpg_offset);
275 (void) close(fd);
280 g_tavor_state[idx].hca_fd = fd;
292 MAP_SHARED, fd, uarpg_offset);
475 int fd;
492 fd = open(DEVDAPLT, O_RDONLY);
493 if (fd < 0) {
499 * libc can't handle fd's greater than 255, in order to
500 * ensure that these values remain available make fd > 255.
503 tmpfd = fcntl(fd, F_DUPFD, 256);
509 (void) close(fd);
510 fd = tmpfd;
514 if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) {
517 (void) close(fd);
524 (void) close(fd);
553 retval = ioctl(fd, DAPL_IA_CREATE, &args);
556 "open_hca: ia_create failed, fd %d, "
558 fd, args.ia_guid, args.ia_port, args.ia_pkey,
562 (void) close(fd);
566 hca_p->ia_fd = fd;
574 "open_hca: ia_created, hca_p 0x%p, fd %d, "
608 "close_hca: closing hca 0x%p, fd %d, rnum %d\n",