/illumos-gate/usr/src/lib/libproc/common/ |
H A D | pr_stat.c | 219 pr_fstat(struct ps_prochandle *Pr, int fd, struct stat *buf) argument 231 return (fstat(fd, buf)); 240 adp->arg_value = fd; 452 pr_fstat64(struct ps_prochandle *Pr, int fd, struct stat64 *buf) argument 464 return (fstat64(fd, buf)); 477 adp->arg_value = fd;
|
H A D | proc_stdio.c | 48 int fd; local 62 if ((fd = mkstemp(stdout_name)) < 0) { 70 if (dup2(fd, 1) < 0) { 71 (void) close(fd); 77 (void) close(fd); 80 if ((fd = mkstemp(stderr_name)) < 0) { 89 if (dup2(fd, 2) < 0) { 90 (void) close(fd); 95 (void) close(fd); 99 (void) close(fd); [all...] |
/illumos-gate/usr/src/lib/libresolv2/common/isc/ |
H A D | ev_files.c | 42 static evFile *FindFD(const evContext_p *ctx, int fd, int eventmask); 46 int fd, 57 "evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n", 58 ctx, fd, eventmask, func, uap); 62 if (fd > ctx->highestFD) 65 OK(mode = fcntl(fd, F_GETFL, NULL)); /*%< side effect: validate fd. */ 74 if (fd >= ctx->maxnfds && evPollfdRealloc(ctx, 1, fd) != 0) 77 id = FindFD(ctx, fd, EV_MASK_AL 45 evSelectFD(evContext opaqueCtx, int fd, int eventmask, evFileFunc func, void *uap, evFileID *opaqueID ) argument 268 FindFD(const evContext_p *ctx, int fd, int eventmask) argument [all...] |
/illumos-gate/usr/src/lib/libbc/libc/gen/common/ |
H A D | _nlist.c | 30 _nlist(int fd, struct nlist *list) argument 55 if ((fd == -1) || (lseek(fd, 0L, 0) == -1) || 56 (read(fd, (char*)&buf, sizeof buf) != sizeof buf) || N_BADMAG(buf)) 63 lseek(fd, sa, 0); 64 if (read(fd, (char *)space, m) != m) 77 lseek(fd, ss+soff, 0); 78 read(fd, strs, sizeof strs);
|
H A D | strftime.c | 397 register int fd; local 432 if ((fd = openlocale("LC_TIME", LC_TIME, temp, _locales[LC_TIME - 1])) < 0) 435 if (fd == 0) 437 if ((fstat(fd, &buf)) != 0) 440 close(fd); 444 if ((read(fd, str, (int)buf.st_size)) != buf.st_size) { 445 close(fd); 496 (void) close(fd); 514 (void) close(fd);
|
/illumos-gate/usr/src/lib/libbsm/common/ |
H A D | bsm.c | 35 auditdoor(int fd) argument 37 return (syscall(SYS_auditsys, BSM_AUDITDOOR, fd));
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | lfmt_log.c | 60 static int fd = -1; local 93 if (fd == -1 && 94 ((fd = open(LOGNAME, O_WRONLY)) == -1 || 95 fcntl(fd, F_SETFD, 1) == -1)) 102 if (putmsg(fd, 0, &dat, 0) == -1) { 103 (void) close(fd);
|
/illumos-gate/usr/src/lib/libc/port/locale/ |
H A D | ldpart.c | 53 int saverr, fd, i, num_lines; local 70 if ((fd = open(filename, O_RDONLY)) < 0) 72 if (fstat(fd, &st) != 0) 86 if (read(fd, p, (size_t)st.st_size) != st.st_size) 104 (void) close(fd); 122 (void) close(fd);
|
H A D | rune.c | 67 int fd; local 69 if ((fd = open(fname, O_RDONLY)) < 0) { 74 if (fstat(fd, &sb) < 0) { 75 (void) close(fd); 81 (void) close(fd); 87 fdata = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 88 (void) close(fd);
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | stat.c | 37 fstatat64(int fd, const char *name, struct stat64 *sb, int flags) argument 39 return (syscall(SYS_fstatat64, fd, name, sb, flags)); 66 fstat64(int fd, struct stat64 *sb) argument 69 return (syscall(SYS_fstat64, fd, sb)); 71 return (fstatat64(fd, NULL, sb, 0)); 79 fstatat(int fd, const char *name, struct stat *sb, int flags) argument 81 return (syscall(SYS_fstatat, fd, name, sb, flags)); 108 fstat(int fd, struct stat *sb) argument 111 return (syscall(SYS_fstat, fd, sb)); 113 return (fstatat(fd, NUL [all...] |
/illumos-gate/usr/src/lib/libmail/common/ |
H A D | maillock.c | 130 int fd; local 133 fd = open(tempfile, O_RDWR|O_CREAT|O_EXCL, 0600); 134 if (fd < 0) 136 (void) fstat(fd, &sbuf); 145 (void) write(fd, "0", 2); 146 (void) close(fd);
|
/illumos-gate/usr/src/cmd/picl/plugins/sun4v/lib/snmp/ |
H A D | snmplib.h | 60 int fd; member in struct:picl_snmphdl
|
/illumos-gate/usr/src/cmd/ptools/pwait/ |
H A D | pwait.c | 118 if ((pfd->fd = open(psinfofile, O_RDONLY)) >= 0) { 145 if (pfd->fd < 0 || (pfd->revents & ~POLLPRI) == 0) { 160 if (pread(pfd->fd, &psinfo, 179 (void) close(pfd->fd); 180 pfd->fd = -1; 190 do_count(void *nofilesp, int fd) argument
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/bridged/ |
H A D | dlpi.c | 214 int fd = dlpi_fd(port->dlpi); local 217 if (strioctl(fd, DLIOCLOWLINK, &lowflag, sizeof (lowflag)) != 0) 220 if (ioctl(fd, I_PUSH, "pfmod") == 0) { 228 if (strioctl(fd, PFIOCSETF, &pf, sizeof (pf)) == -1)
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/ |
H A D | contracts.c | 51 * Returns -1 on error, else the fd of the created template. 56 int fd; local 59 if ((fd = open(CONTRACT_TEMPLATE_PATH, O_RDWR)) == -1) { 73 if (((err = ct_pr_tmpl_set_param(fd, 75 ((err = ct_pr_tmpl_set_fatal(fd, CT_PR_EV_HWERR)) != 0) || 76 ((err = ct_tmpl_set_critical(fd, 0)) != 0) || 77 ((err = ct_tmpl_set_informative(fd, 0)) != 0)) { 81 (void) close(fd); 85 return (fd); 169 /* Returns -1 on error (with errno set), else fd 183 int fd; local 223 int fd; local [all...] |
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/wpad/ |
H A D | l2_packet.c | 90 l2_packet_receive(int fd, void *eloop_ctx, void *sock_ctx) argument
|
/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_shell.c | 75 closefd_walk(void *unused, int fd) argument 77 if (fd > 2) 78 (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
|
/illumos-gate/usr/src/cmd/dtrace/test/cmd/badioctl/ |
H A D | badioctl.c | 61 int fd = -1, random, ps = sysconf(_SC_PAGESIZE); local 88 if (fd != -1) 89 close(fd); 91 fd = open("/devices/pseudo/dtrace@0:dtrace", O_RDONLY); 93 if (fd == -1) 110 ioctl(fd, DTRACEIOC | ioc, addr);
|
/illumos-gate/usr/src/cmd/dumpadm/ |
H A D | minfree.c | 45 int fd; local 49 if ((fd = open(path, oflags, S_IRUSR | S_IWUSR)) >= 0) 50 return (fdopen(fd, fmode));
|
/illumos-gate/usr/src/cmd/fm/modules/common/cpumem-retire/ |
H A D | cma_cpu_arch.c | 49 int fd, rc, err; local 68 if ((fd = open("/dev/bl", O_RDONLY)) < 0) 73 (void) close(fd); 80 (void) close(fd); 88 rc = ioctl(fd, repair ? BLIOC_DELETE : BLIOC_INSERT, &blr); 92 (void) close(fd);
|
/illumos-gate/usr/src/cmd/rpcbind/ |
H A D | warmstart.c | 58 int fd; local 73 fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, 0600); 74 if (fd == -1) 76 fp = fdopen(fd, "w"); 78 close(fd); 121 int fd; local 126 fd = open(filename, O_RDONLY, 0600); 127 if (fd == -1) { 132 fp = fdopen(fd, "r"); 134 close(fd); [all...] |
/illumos-gate/usr/src/cmd/saf/ |
H A D | log.c | 62 int fd; local 69 if ((fd = open("/dev/console", O_WRONLY|O_NOCTTY)) != -1) 70 (void) write(fd, buf, strlen(buf) + 1); 71 (void) close(fd);
|
/illumos-gate/usr/src/cmd/sdpadm/ |
H A D | sdpadm.c | 92 int fd; local 110 fd = open(dcname, O_RDONLY); 111 if (fd < 0) { 135 if (ioctl(fd, I_STR, &stri) >= 0) {
|
/illumos-gate/usr/src/cmd/sendmail/libsm/ |
H A D | smstdio.c | 291 int fd; local 296 fd = fileno((FILE *) fp->f_cookie); 297 if (fd < 0) 299 if (fstat(fd, &st) == 0) 331 int fd; local 336 fd = fileno(stream); 337 SM_REQUIRE(fd >= 0); 362 fp->f_file = fd;
|
/illumos-gate/usr/src/cmd/sgs/libelf/common/ |
H A D | begin.c | 51 _elf_member(int fd, Elf * ref, unsigned flags) argument 60 fd = -1; 65 if (ref->ed_fd != fd) { 85 elf->ed_fd = fd; 111 _elf_regular(int fd, unsigned flags) /* initialize regular file */ argument 121 elf->ed_fd = fd; 255 * elf1 = elf_begin(fd, ELF_C_WRITE, 0); 300 elf_begin(int fd, Elf_Cmd cmd, Elf *ref) argument 342 elf->ed_fd = fd; 365 if ((elf = _elf_regular(fd, flag [all...] |