Home
last modified time | relevance | path

Searched refs:mfd (Results 1 – 11 of 11) sorted by relevance

/illumos-gate/usr/src/test/libc-tests/tests/common/
H A Dopenpty.c32 int mfd = posix_openpt(O_RDWR | O_NOCTTY); in openpty() local
35 if (mfd < 0) { in openpty()
40 if (grantpt(mfd) != 0 || unlockpt(mfd) != 0) { in openpty()
42 (void) close(mfd); in openpty()
46 name = ptsname(mfd); in openpty()
48 warnx("failed to get ptsname for fd %d", mfd); in openpty()
49 (void) close(mfd); in openpty()
56 (void) close(mfd); in openpty()
63 (void) close(mfd); in openpty()
68 *mfdp = mfd; in openpty()
/illumos-gate/usr/src/test/libc-tests/tests/
H A Disatty.c38 int sfd, mfd; in main() local
109 if (!openpty(&mfd, &sfd)) { in main()
120 if (isatty(mfd) != 0) { in main()
127 (void) close(mfd); in main()
H A Dprintf-15294.c69 int mfd, sfd; in main() local
72 if (!openpty(&mfd, &sfd)) in main()
89 VERIFY0(close(mfd)); in main()
/illumos-gate/usr/src/cmd/bhyve/
H A Dmevent.c92 static int mfd; variable
175 mfd = kqueue(); in mevent_init()
177 mfd = port_create(); in mevent_init()
179 assert(mfd > 0); in mevent_init()
183 if (caph_rights_limit(mfd, &rights) == -1) in mevent_init()
551 mevp->me_notify.portnfy_port = mfd; in mevent_populate()
674 ret = kevent(mfd, &kev, 1, NULL, 0, NULL); in mevent_add_state()
879 ret = kevent(mfd, changelist, numev, NULL, 0, NULL); in mevent_dispatch()
888 ret = kevent(mfd, NULL, 0, eventlist, MEVENT_MAX, NULL); in mevent_dispatch()
905 ret = port_get(mfd, &pev, NULL); in mevent_dispatch()
/illumos-gate/usr/src/cmd/format/
H A Dcheckdev.c128 int mfd; in getpartition() local
146 if ((mfd = open(raw_device, O_RDWR | O_NDELAY)) < 0) { in getpartition()
152 if (fstat(mfd, &stbuf) == -1 || !S_ISCHR(stbuf.st_mode)) { in getpartition()
153 (void) close(mfd); in getpartition()
159 if (ioctl(mfd, DKIOCINFO, &dkinfo) < 0) { in getpartition()
160 (void) close(mfd); in getpartition()
166 (void) close(mfd); in getpartition()
/illumos-gate/usr/src/cmd/audio/audioctl/
H A Daudioctl.c147 int mfd; member
195 if (d->mfd >= 0) in free_device()
196 (void) close(d->mfd); in free_device()
225 d->mfd = -1; in alloc_device()
268 d->mfd = fd; in get_device_info()
453 int mfd = d->mfd; in print_control() local
468 if (ioctl(mfd, SNDCTL_MIX_READ, &cval) < 0) { in print_control()
606 int mfd = d->mfd; in set_device_control() local
676 if (ioctl(mfd, SNDCTL_MIX_WRITE, &cval) < 0) { in set_device_control()
/illumos-gate/usr/src/cmd/fdformat/
H A Dfdformat.c1075 int mfd; in check_mount() local
1101 if ((mfd = open(raw_device, O_RDWR | O_NDELAY)) < 0) { in check_mount()
1108 if (fstat(mfd, &stbuf) == -1 || !S_ISCHR(stbuf.st_mode)) { in check_mount()
1109 (void) close(mfd); in check_mount()
1115 if (ioctl(mfd, DKIOCINFO, &dkinfo_tmp) < 0) { in check_mount()
1116 (void) close(mfd); in check_mount()
1122 (void) close(mfd); in check_mount()
/illumos-gate/usr/src/cmd/rmformat/
H A Drmf_misc.c489 int32_t mfd; in check_and_unmount_floppy() local
526 mfd = open(raw_device, O_RDWR | O_NDELAY); in check_and_unmount_floppy()
531 if (mfd < 0) { in check_and_unmount_floppy()
538 if (fstat(mfd, &stbuf) < 0 || !S_ISCHR(stbuf.st_mode)) { in check_and_unmount_floppy()
539 (void) close(mfd); in check_and_unmount_floppy()
545 if (ioctl(mfd, DKIOCINFO, &dkinfo_tmp) < 0) { in check_and_unmount_floppy()
546 (void) close(mfd); in check_and_unmount_floppy()
552 (void) close(mfd); in check_and_unmount_floppy()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/
H A Dsys-solaris.c3003 int mfd; local
3007 mfd = open("/dev/ptmx", O_NOCTTY | O_RDWR);
3008 if (mfd < 0) {
3012 pty_name = ptsname(mfd);
3017 pty_name = ptsname(mfd);
3021 (void) close(mfd);
3030 if (unlockpt(mfd) < 0) {
3036 (void) close(mfd);
3042 dbglog("Using %s; master fd %d, slave fd %d", pty_name, mfd, sfd);
3046 *master_fdp = mfd;
/illumos-gate/usr/src/uts/common/io/skd/
H A Dskd.c2532 uint32_t mfd; in skd_isr_msg_from_dev() local
2537 mfd = SKD_READL(skdev, FIT_MSG_FROM_DEVICE); in skd_isr_msg_from_dev()
2539 Dcmn_err(CE_NOTE, "mfd=0x%x last_mtd=0x%x\n", mfd, skdev->last_mtd); in skd_isr_msg_from_dev()
2544 if (FIT_MXD_TYPE(mfd) != FIT_MXD_TYPE(skdev->last_mtd)) { in skd_isr_msg_from_dev()
2548 switch (FIT_MXD_TYPE(mfd)) { in skd_isr_msg_from_dev()
2550 skdev->proto_ver = FIT_PROTOCOL_MAJOR_VER(mfd); in skd_isr_msg_from_dev()
2570 skdev->hard_queue_depth_limit = FIT_MXD_DATA(mfd); in skd_isr_msg_from_dev()
/illumos-gate/usr/src/lib/libproc/common/
H A DPcontrol.c399 int mfd; in dupfd() local
407 if ((mfd = minfd) == 0) in dupfd()
408 mfd = set_minfd(); in dupfd()
409 if (dfd > 0 || (0 <= fd && fd < mfd)) { in dupfd()
411 dfd = mfd; in dupfd()