/illumos-gate/usr/src/cmd/lp/lib/lp/ |
H A D | printlist.c | 93 fdprintlist(int fd, char **list) argument 100 (void)fdprintf (fd, "%s%s", sep, NB(print_prefix)); 102 q_print (fd, *list, print_sep); 104 (void)fdprintf (fd, "%s", *list); 106 (void)fdprintf (fd, "%s", NB(print_suffix)); 111 (void)fdprintf (fd, print_newline); 118 q_print(int fd, char *str, char *sep) argument 122 fdputc('\\', fd); 123 fdputc(*str, fd);
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | timerfd.c | 26 int fd; local 39 if ((fd = open("/dev/timerfd", oflags)) < 0) 42 if (ioctl(fd, TIMERFDIOC_CREATE, clockid) != 0) { 43 (void) close(fd); 47 return (fd); 51 timerfd_settime(int fd, int flags, const struct itimerspec *new_value, argument 66 rval = ioctl(fd, TIMERFDIOC_SETTIME, &st); 81 timerfd_gettime(int fd, struct itimerspec *curr_value) argument 83 int rval = ioctl(fd, TIMERFDIOC_GETTIME, curr_value);
|
/illumos-gate/usr/src/uts/common/krtld/ |
H A D | bootrd.c | 70 int fd; local 78 fd = bbootfs_ops.fsw_open(file, flags); 81 return (fd); 83 if (strncmp(file, SYSTEM_BOOT_PATH, len) == 0 || fd >= 0) 84 return ((fd < 0) ? fd : (fd | BFD_F_SYSTEM_BOOT)); 90 BRD_CLOSE(struct boot_fs_ops *ops, int fd) argument 92 if (fd & BFD_F_SYSTEM_BOOT) 93 return (bbootfs_ops.fsw_close(fd 99 BRD_READ(struct boot_fs_ops *ops, int fd, caddr_t buf, size_t len) argument 110 BRD_SEEK(struct boot_fs_ops *ops, int fd, off_t addr, int whence) argument 121 BRD_FSTAT(struct boot_fs_ops *ops, int fd, struct bootstat *bsp) argument [all...] |
/illumos-gate/usr/src/lib/libast/common/comp/ |
H A D | open.c | 50 int fd; 73 if ((fd = creat(path, (op & O_EXCL) ? 0 : mode)) < 0) 77 if (fstat(fd, &st) || (st.st_mode & S_IPERM)) 80 close(fd); 84 if (mode && fchmod(fd, mode)) 92 close(fd); 97 else if ((fd = open(path, op & (_ast_O_LOCAL-1), mode)) < 0) 106 else if ((op & O_APPEND) && lseek(fd, 0L, SEEK_END) == -1L) 109 if ((op & O_NOCTTY) && ioctl(fd, TIOCNOTTY, 0)) 115 else fd [all...] |
/illumos-gate/usr/src/lib/libdevinfo/ |
H A D | devinfo_dli.c | 90 int fd; local 103 fd = -1; 108 fd = open(dlipath, oflag, mode); 109 if (fd < 0) 112 if (fchmod(fd, mode) < 0) { 113 (void) close(fd); 114 fd = -1; 120 if (fcntl(fd, F_SETLKW, &lock) < 0) { 121 (void) close(fd); 122 fd 148 di_dli_close(int fd) argument [all...] |
/illumos-gate/usr/src/test/os-tests/tests/file-locking/ |
H A D | acquire-lock.c | 36 static void acq_flock(int fd, int mode); 41 acq_fcntl(int fd, int cmd, int mode) argument 54 ret = fcntl(fd, cmd, &fl); 69 ret = fcntl(fd, cmd, &fl); 77 acq_flock(int fd, int mode) argument 88 ret = flock(fd, mode); 101 ret = flock(fd, LOCK_UN); 109 acq_run(int fd, lock_style_t style, boolean_t is_exclusive) argument 113 acq_fcntl(fd, F_SETLKW, is_exclusive ? F_WRLCK : F_RDLCK); 116 acq_fcntl(fd, F_OFD_SETLK 133 int fd; local [all...] |
/illumos-gate/usr/src/lib/libnsl/nsl/ |
H A D | t_open.c | 66 int retval, fd, sv_errno; local 83 if ((fd = open(path, flags)) < 0) { 94 retval = ioctl(fd, I_FIND, "timod"); 101 (void) close(fd); 115 retval = ioctl(fd, I_PUSH, "timod"); 122 (void) close(fd); 144 tiptr = _t_create(fd, info, api_semantics, &ticap_ioctl_failed); 153 (void) close(fd); 161 (void) close(fd); 178 retval = ioctl(fd, I_FLUS [all...] |
H A D | t_getstate.c | 42 _tx_getstate(int fd, int api_semantics) argument 46 if ((tiptr = _t_checkfd(fd, 0, api_semantics)) == NULL)
|
H A D | t_sync.c | 41 _tx_sync(int fd, int api_semantics) argument 58 if ((tiptr = _t_checkfd(fd, force_sync, api_semantics)) == NULL)
|
/illumos-gate/usr/src/lib/libc/port/stdio/ |
H A D | _endopen.c | 58 int oflag, fd, fflag, eflag, plusflag, xflag; local 114 fd = open64(name, oflag, 0666); 116 fd = open(name, oflag, 0666); 118 if (fd < 0) 123 iop->_file = fd; 126 if (fd <= _FILE_FD_MAX) { 127 SET_FILE(iop, fd); 128 } else if (_file_set(iop, fd, type) != 0) { 130 (void) close(fd); 137 if (lseek64(fd, (off64_ [all...] |
/illumos-gate/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/ |
H A D | cmd_ecache.c | 70 int fd; local 77 if ((fd = open(path, O_RDONLY)) < 0) 81 if (ioctl(fd, MCIOC_CTRLCONF, &mcc) >= 0 || errno != EINVAL || 83 (void) close(fd); 87 (void) close(fd); 131 int fd; local 133 if ((fd = open(cmd.cmd_ecache_dev, O_RDONLY)) < 0) { 142 (fd = open(cmd.cmd_ecache_dev, O_RDONLY)) < 0) 146 if (ioctl(fd, MCIOC_ECFLUSH, cpuid) < 0) { 148 (void) close(fd); [all...] |
/illumos-gate/usr/src/boot/lib/libstand/ |
H A D | open.c | 75 int fd; local 77 for (fd = 0; fd < SOPEN_MAX; fd++) 78 if (files[fd].f_flags == 0) 79 return(fd); 96 int fd, i, error, besterror; local 99 if ((fd = o_gethandle()) == -1) { 104 f = &files[fd]; 129 return (fd); [all...] |
/illumos-gate/usr/src/lib/libshell/common/bltins/ |
H A D | mkservice.c | 118 short fd; member in struct:Service_s 136 static int fdclose(Service_t *sp, register int fd) argument 139 service_list[fd] = 0; 140 if(sp->fd==fd) 141 sp->fd = -1; 144 if(file_list[i]==fd) 148 (*sp->actionf)(sp, fd, 1); 185 int r=0, fd = sffileno(iop); local 186 Service_t * sp = service_list[fd]; 211 waitnotify(int fd, long timeout, int rw) argument 285 int fd; local 310 Action(Service_t *sp, int fd, int close) argument 413 register int fd; local [all...] |
/illumos-gate/usr/src/cmd/make/bin/ |
H A D | state.cc | 46 #define XFWRITE(string, length, fd) {if (fwrite(string, 1, length, fd) == 0) \ 48 #define XPUTC(ch, fd) { \ 49 if (putc((int) ch, fd) == EOF) \ 52 #define XFPUTS(string, fd) fputs(string, fd) 96 static void print_auto_depes(register Dependency dependency, register FILE *fd, register Boolean built_this_run, register int *line_length, register char *target_name, jmp_buf long_jump); 123 register FILE *fd; local 169 if ((fdes < 0) || (fd = fdopen(fdes, "w")) == NULL) { 187 if ((fd 413 print_auto_depes(register Dependency dependency, register FILE *fd, register Boolean built_this_run, register int *line_length, register char *target_name, jmp_buf long_jump) argument [all...] |
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/ |
H A D | util.c | 173 find_pollfd(int fd) argument 178 if (poll_fds[n].fd == fd) 185 set_pollfd(int fd, uint16_t events) argument 190 p = find_pollfd(fd); 200 poll_fds[num_pollfds + i].fd = -1; 206 p->fd = fd; 214 clear_pollfd(int fd) argument 218 if ((p = find_pollfd(fd)) ! 226 isset_pollfd(int fd) argument 242 safe_read(int fd, void *buf, size_t sz) argument 306 enable_blocking(int fd) argument 313 disable_blocking(int fd) argument [all...] |
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/ |
H A D | log.c | 112 int fd; local 119 fd = 1; 122 if ((fd = open_logfile("lpsched")) < 0) 133 fdprintf (fd, "%.2d/%.2d %.2d:%.2d:%.2d: ", 137 fdprintf(fd, "bad date: "); 142 write(fd, buf, strlen(buf)); 147 close(fd); 161 int fd = open_logfile("exec"); local 167 if (fd >= 0) { 171 fdprintf (fd, " [all...] |
/illumos-gate/usr/src/ucblib/libucb/port/gen/ |
H A D | nlist.c | 97 int fd; local 107 if ((fd = open(name, 0)) < 0) 109 if (read(fd, magic_buf, (size_t)EI_NIDENT) == -1) { 110 (void) close(fd); 114 if (lseek(fd, 0L, 0) == -1L) { /* rewind to beginning of object file */ 115 (void) close(fd); 125 (void) close(fd); 130 return (_elf_nlist(fd, list)); 134 return (_coff_nlist(fd, list)); 141 _elf_nlist(int fd, struc argument 294 elf_read(int fd, long offset, size_t size, size_t memsize, Elf_Type dtype) argument 348 end_elf_job(int fd) argument 356 _coff_nlist(int fd, struct nlist *list) argument 479 sym_close(int fd) argument 489 sym_read(int fd, struct syment *sym, int size) argument 521 fill_sym_buf(int fd, int size) argument [all...] |
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/ |
H A D | libfruaccess.c | 154 int fd; local 156 if ((fd = fru_open_dev()) == -1) { 161 if (ioctl(fd, SGFRU_GETNUMSECTIONS, &numsections) != 0) { 173 int fd; local 175 if ((fd = fru_open_dev()) == -1) { 181 if (ioctl(fd, SGFRU_GETSECTIONS, §ions) != 0) { 192 int fd; local 194 if ((fd = fru_open_dev()) == -1) { 199 if (ioctl(fd, SGFRU_GETNUMSEGMENTS, &numsegments) != 0) { 211 int fd; local 231 int fd; local 261 int fd; local 287 int fd; local 307 int fd; local 328 int fd; local 347 int fd; local 367 int fd; local 386 int fd; local 413 int fd; local 445 int fd; local [all...] |
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | net_read.c | 31 * krb5_net_read() reads from the file descriptor "fd" to the buffer 33 * read anymore from "fd". It returns the number of bytes read 42 krb5_net_read(krb5_context context, int fd, register char *buf, register int len) argument 47 cc = SOCKET_READ((SOCKET)fd, buf, len);
|
H A D | net_write.c | 32 * descriptor "fd". It returns the number of bytes written or 41 krb5_net_write(krb5_context context, int fd, register const char *buf, int len) argument 46 cc = SOCKET_WRITE((SOCKET)fd, buf, wrlen);
|
/illumos-gate/usr/src/lib/libsocket/socket/ |
H A D | socket.c | 95 int fd; local 107 fd = _so_socket(family, type, protocol, NULL, version); 108 if (fd == -1) { 131 fd = _so_socket(family, type, protocol, devpath, version); 133 if (fd == -1) { 138 if (_setsockopt(fd, SOL_SOCKET, SO_PROTOTYPE, 140 (void) close(fd); 151 return (fd);
|
/illumos-gate/usr/src/lib/libbc/libc/gen/common/ |
H A D | opendir.c | 43 register int fd; local 49 if ((fd = open(name, O_RDONLY | O_NDELAY)) == -1) 51 if (fstat(fd, &sb) == -1) { 52 (void) close(fd); 57 (void) close(fd); 64 (void) close(fd); 67 dirp->dd_fd = fd; 72 (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | closedir.c | 52 int fd = dirp->dd_fd; local 57 return (close(fd));
|
H A D | isastream.c | 49 isastream(int fd) argument 53 rval = ioctl(fd, I_CANPUT, 0);
|
H A D | mkfifo.c | 39 mkfifoat(int fd, const char *path, mode_t mode) argument 43 return (mknodat(fd, path, mode, 0));
|