/illumos-gate/usr/src/lib/libresolv2/common/isc/ |
H A D | eventlib_p.h | 79 int fd; member 90 int fd; member 115 int fd; member 131 int fd; member 193 extern void __fd_clr(int fd, __evEmulMask *maskp); 194 extern void __fd_set(int fd, __evEmulMask *maskp); 200 #define FD_SET(fd, maskp) \ argument 201 __fd_set(fd, maskp) 204 #define FD_CLR(fd, maskp) \ argument 205 __fd_clr(fd, maskp) [all …]
|
/illumos-gate/usr/src/cmd/connstat/ |
H A D | connstat_mib.c | 35 int fd; in mibopen() local 37 fd = open("/dev/arp", O_RDWR); in mibopen() 38 if (fd == -1) { in mibopen() 42 if (ioctl(fd, I_PUSH, proto) == -1) { in mibopen() 44 (void) close(fd); in mibopen() 49 return (fd); in mibopen() 53 conn_walk(int fd, connstat_proto_t *proto, conn_walk_state_t *state) in conn_walk() argument 83 if (putmsg(fd, &cbuf, NULL, 0) == -1) { in conn_walk() 105 r = getmsg(fd, &cbuf, NULL, &flags); in conn_walk() 151 r = getmsg(fd, NULL, &dbuf, &flags); in conn_walk()
|
/illumos-gate/usr/src/lib/librpcsvc/common/ |
H A D | bindresvport.c | 69 int fd; local 96 if (!clnt_control(cl, CLGET_FD, (char *)&fd)) { 101 if (t_getstate(fd) != T_UNBND) { 102 while ((t_unbind(fd) < 0) && (t_errno == TLOOK)) { 117 if (getmsg(fd, ctl, data, &flags) < 0) 121 if (t_getstate(fd) != T_UNBND) 125 tbind = (struct t_bind *)t_alloc(fd, T_BIND, T_ADDR); 131 tres = (struct t_bind *)t_alloc(fd, T_BIND, T_ADDR); 179 res = t_bind(fd, tbind, tres); 184 (void) t_unbind(fd);
|
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/privs/ |
H A D | tst.fds.ksh | 33 printf("%d: field =fmt\n", fd, fds[fd].field); 40 DUMPFIELD(fd, %s, fi_name); \ 41 DUMPFIELD(fd, %s, fi_dirname); \ 42 DUMPFIELD(fd, %s, fi_pathname); \ 43 DUMPFIELD(fd, %d, fi_offset); \ 44 DUMPFIELD(fd, %s, fi_fs); \ 45 DUMPFIELD(fd, %o, fi_oflags);
|
/illumos-gate/usr/src/cmd/lp/lib/users/ |
H A D | usermgmt.c | 44 int fd; in putuser() local 58 if ((fd = open_locked(Lp_Users, "w", LPU_MODE)) < 0) in putuser() 60 output_tbl(fd, ppri_tbl); in putuser() 61 close(fd); in putuser() 97 int fd; in deluser() local 109 if ((fd = open_locked(Lp_Users, "w", LPU_MODE)) < 0) in deluser() 112 output_tbl(fd, ppri_tbl); in deluser() 113 close(fd); in deluser()
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/ |
H A D | shiocmd_solaris.c | 396 int fd; member 498 int fd = -1; in b_open() local 573 if(fd<0) in b_open() 585 fdp->fd = fd; in b_open() 609 int fd = -1; in b_close() local 695 if(fd<0) in b_tmpfile() 709 fdp->fd = fd; in b_tmpfile() 771 if(fd<0) in b_dup() 784 fdp->fd = fd; in b_dup() 855 fdp->fd = -1; in b_stat() [all …]
|
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/ |
H A D | flushinp.c | 56 int fd; in flushinp() local 62 fd = cur_term->_ifd; in flushinp() 64 fd = cur_term->_ofd; in flushinp() 66 fd = -1; in flushinp() 68 if (0 <= fd) in flushinp() 69 (void) tcflush(fd, TCIFLUSH); in flushinp()
|
/illumos-gate/usr/src/cmd/rpcbind/ |
H A D | warmstart.c | 58 int fd; in open_tmp_file() local 73 fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, 0600); in open_tmp_file() 74 if (fd == -1) in open_tmp_file() 76 fp = fdopen(fd, "w"); in open_tmp_file() 78 close(fd); in open_tmp_file() 121 int fd; in read_struct() local 126 fd = open(filename, O_RDONLY, 0600); in read_struct() 127 if (fd == -1) { in read_struct() 132 fp = fdopen(fd, "r"); in read_struct() 134 close(fd); in read_struct() [all …]
|
/illumos-gate/usr/src/lib/libipadm/common/ |
H A D | ipadm_ndpd.c | 255 int fd; in i_ipadm_send_ndpd_cmd() local 266 fd = socket(AF_UNIX, SOCK_STREAM, 0); in i_ipadm_send_ndpd_cmd() 267 if (fd == -1) in i_ipadm_send_ndpd_cmd() 271 flags = fcntl(fd, F_GETFL, 0); in i_ipadm_send_ndpd_cmd() 273 (void) fcntl(fd, F_SETFL, flags | O_NONBLOCK); in i_ipadm_send_ndpd_cmd() 296 if (ipadm_ndpd_write(fd, &msg, sizeof (msg)) < 0) in i_ipadm_send_ndpd_cmd() 298 if (ipadm_ndpd_read(fd, &retval, sizeof (retval)) < 0) in i_ipadm_send_ndpd_cmd() 300 (void) close(fd); in i_ipadm_send_ndpd_cmd() 305 (void) close(fd); in i_ipadm_send_ndpd_cmd() 314 ipadm_ndpd_read(int fd, void *buffer, size_t buflen) in ipadm_ndpd_read() argument [all …]
|
/illumos-gate/usr/src/lib/libvmmapi/common/ |
H A D | vmmapi.c | 95 int fd; member 112 int fd, len; in vm_device_open() local 124 return (fd); in vm_device_open() 181 vm->fd = -1; in vm_open() 204 close(vm->fd); in vm_close() 214 close(vm->fd); in vm_destroy() 239 vm->fd = -1; in vm_destroy() 715 fd = -1; in vm_create_devmem() 733 if (fd < 0) in vm_create_devmem() 763 if (fd >= 0) in vm_create_devmem() [all …]
|
/illumos-gate/usr/src/cmd/nohup/ |
H A D | nohup.c | 79 int fd; in open_file() local 96 return (fd); in open_file() 102 int fd = -1; in main() local 163 if ((fd = open_file()) < 0) in main() 170 if (fd < 0 && (fd = open_file()) < 0) in main() 176 if (fd >= 0) in main() 177 (void) close(fd); in main() 243 fd_cb(void *data, int fd) in fd_cb() argument 294 if (tmpfd != fd) { in fd_cb() 296 (void *)(uintptr_t)fd); in fd_cb() [all …]
|
/illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/ |
H A D | flushinp.c | 51 int fd; in flushinp() local 61 fd = cur_term->_ifd; in flushinp() 63 fd = cur_term->_ofd; in flushinp() 65 fd = -1; in flushinp() 67 if (0 <= fd) in flushinp() 68 (void) tcflush(fd, TCIFLUSH); in flushinp()
|
/illumos-gate/usr/src/cmd/sendmail/db/os/ |
H A D | os_map.c | 127 return (__db_jump.j_map(path, infop->fd, infop->size, 163 infop->fd, infop->size, 1, 1, 0, &infop->addr); 187 infop->fd, infop->size, 1, 1, 0, &infop->addr); 205 infop->fd, infop->size, 1, 0, 0, &infop->addr); 293 __db_mapfile(path, fd, len, is_rdonly, addr) in __db_mapfile() argument 295 int fd, is_rdonly; 300 return (__db_jump.j_map(path, fd, len, 0, 0, is_rdonly, addr)); 303 return (__os_map(path, fd, len, 0, 0, is_rdonly, addr)); 338 int fd, is_region, is_anonymous, is_rdonly; 364 fd = -1; [all …]
|
/illumos-gate/usr/src/test/zfs-tests/cmd/readmmap/ |
H A D | readmmap.c | 56 int fd = -1, bytes, retval = 0; in main() local 74 fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666); in main() 75 if (fd == -1) { in main() 81 bytes = write(fd, buf, size); in main() 88 map = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in main() 112 bytes = pread(fd, buf, size, 0); in main() 129 if (fd != -1) { in main() 130 (void) close(fd); in main()
|
/illumos-gate/usr/src/cmd/rm/ |
H A D | rm.c | 55 int fd; /* Stores directory fd */ member 214 frm->fd = -1; in closeframe() 243 int fd; in opendirat() local 255 if (fd < 0) in opendirat() 257 frm->fd = fd; in opendirat() 258 frm->dp = fdopendir(fd); in opendirat() 260 (void) close(fd); in opendirat() 278 if (noerror && cur->up->fd == -1) { in popdir() 280 if (opendirat(cur->fd, "..", rec) != 0 || in popdir() 281 fstat(rec->fd, &buf) != 0) { in popdir() [all …]
|
/illumos-gate/usr/src/lib/libinetutil/common/ |
H A D | eh.c | 171 eh->iueh_pollfds[i].fd = -1; in grow_fds() 200 if (eh->iueh_num_fds <= fd) in iu_register_event() 201 if (grow_fds(eh, fd + EH_FD_SLACK) == 0) in iu_register_event() 216 if (eh->iueh_pollfds[fd].fd != -1) in iu_register_event() 219 eh->iueh_pollfds[fd].fd = fd; in iu_register_event() 220 eh->iueh_pollfds[fd].events = events; in iu_register_event() 221 eh->iueh_events[fd].iuen_callback = callback; in iu_register_event() 222 eh->iueh_events[fd].iuen_arg = arg; in iu_register_event() 224 return (fd); in iu_register_event() 242 eh->iueh_pollfds[event_id].fd == -1) in iu_unregister_event() [all …]
|
/illumos-gate/usr/src/lib/libc/i386/sys/ |
H A D | ptrace.c | 167 int fd; in ptrace() local 203 if (close(fd) != 0) in ptrace() 442 if (dfd > 2 || (0 <= fd && fd <= 2)) { in Dupfd() 447 if (fd != dfd) { in Dupfd() 450 fd = dfd; in Dupfd() 458 return (fd); in Dupfd() 479 int fd; in OpenProc() local 699 int fd; in GetPsargs() local 709 (void) close(fd); in GetPsargs() 721 int fd; in GetSignal() local [all …]
|
/illumos-gate/usr/src/lib/libc/sparc/sys/ |
H A D | ptrace.c | 169 int fd; in ptrace() local 205 if (close(fd) != 0) in ptrace() 452 if (dfd > 2 || (0 <= fd && fd <= 2)) { in Dupfd() 457 if (fd != dfd) { in Dupfd() 460 fd = dfd; in Dupfd() 468 return (fd); in Dupfd() 489 int fd; in OpenProc() local 711 int fd; in GetPsargs() local 721 (void) close(fd); in GetPsargs() 733 int fd; in GetSignal() local [all …]
|
/illumos-gate/usr/src/cmd/sgs/libelf/demo/ |
H A D | pcom.c | 108 process_elf(Elf *elf, char *file, int fd, int member) in process_elf() argument 130 while ((_elf = elf_begin(fd, cmd, elf)) != NULL) { in process_elf() 145 process_elf(_elf, buffer, fd, 1); in process_elf() 180 int fd; in main() local 185 if ((fd = open(elf_fname, O_RDONLY)) == -1) { in main() 194 if ((elf = elf_begin(fd, ELF_C_READ, 0)) == NULL) { in main() 197 (void) close(fd); in main() 204 process_elf(elf, elf_fname, fd, 0); in main() 206 (void) close(fd); in main()
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | utimesys.c | 40 futimens(int fd, const timespec_t times[2]) in futimens() argument 42 return (syscall(SYS_utimesys, 0, fd, times)); in futimens() 46 utimensat(int fd, const char *path, const timespec_t times[2], int flag) in utimensat() argument 48 return (syscall(SYS_utimesys, 1, fd, path, times, flag)); in utimensat() 110 futimesat(int fd, const char *path, const struct timeval *times) in futimesat() argument 130 return (futimens(fd, tsp)); in futimesat() 132 return (utimensat(fd, path, tsp, 0)); in futimesat() 136 futimes(int fd, const struct timeval *times) in futimes() argument 138 return (futimesat(fd, NULL, times)); in futimes()
|
/illumos-gate/usr/src/cmd/iscsitsvc/ |
H A D | iscsitsvc.c | 90 it_open(int *fd) in it_open() argument 95 *fd = open(ISCSIT_NODE, O_RDONLY); in it_open() 96 if (*fd < 0) { in it_open() 118 int fd; in it_enable() local 131 if ((ret = it_open(&fd)) != ITADM_SUCCESS) { in it_enable() 136 (void) fprintf(stdout, "it_enable [fd=%d]\n", fd); in it_enable() 157 if ((ret = ioctl(fd, ISCSIT_IOC_ENABLE_SVC, &hostinfo)) != 0) { in it_enable() 174 int fd; in it_disable() local 180 if ((ret = it_open(&fd)) != ITADM_SUCCESS) { in it_disable() 185 if ((ret = ioctl(fd, ISCSIT_IOC_DISABLE_SVC, NULL)) != 0) { in it_disable()
|
/illumos-gate/usr/src/test/libc-tests/tests/stdio/ |
H A D | fileno.c | 51 check_file(FILE *fp, int fd, const char *msg) in check_file() argument 54 if (act != fd) { in check_file() 56 msg, fd, act); in check_file() 110 int fd, dupfd; in check_fdopen() local 113 fd = open("/dev/null", O_RDWR); in check_fdopen() 114 if (fd < 0) { in check_fdopen() 117 fno_nextfd = fd + 1; in check_fdopen() 119 f = fdopen(fd, "r+"); in check_fdopen() 123 check_file(f, fd, "fdopen"); in check_fdopen() 125 if ((dupfd = dup2(fd, FNO_DUPFD)) != FNO_DUPFD) { in check_fdopen()
|
/illumos-gate/usr/src/cmd/ttymon/ |
H A D | tmutil.c | 163 int i, fd; in vml() local 199 if ((fd = open(USERDEV, O_RDWR)) == -1) { in vml() 208 if ((i = ioctl(fd, SAD_VML, &newlist)) < 0) { in vml() 211 (void) close(fd); in vml() 216 (void) close(fd); in vml() 219 (void) close(fd); in vml() 244 int fd; in cons_printf() local 251 if ((fd = open(CONSOLE, O_WRONLY|O_NOCTTY)) != -1) in cons_printf() 252 (void) write(fd, buf, strlen(buf) + 1); in cons_printf() 253 (void) close(fd); in cons_printf()
|
/illumos-gate/usr/src/cmd/rmformat/ |
H A D | rmf_misc.c | 504 (void) close(fd); in check_and_unmount_floppy() 589 int32_t fd; in my_open() local 704 return (fd); in my_open() 1317 int fd; in get_device() local 1352 if (fd < 0) { in get_device() 1361 dev->d_fd = fd; in get_device() 1431 int fd; in lookup_device() local 1487 int fd; in is_cd() local 1491 if (fd < 0) in is_cd() 1997 int32_t fd; in get_media_info() local [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/edit/ |
H A D | history.c | 206 close(fd); in sh_checkaudit() 275 close(fd); in sh_histinit() 276 fd=n; in sh_histinit() 282 close(fd); in sh_histinit() 286 fd = -1; in sh_histinit() 288 if(fd < 0) in sh_histinit() 300 if(fd<0) in sh_histinit() 311 close(fd); in sh_histinit() 392 fd = n; in sh_histinit() 395 if(fd>=0) in sh_histinit() [all …]
|