/illumos-gate/usr/src/lib/libnsl/nsl/ |
H A D | xti_wrappers.c | 55 _xti_accept(int fd, int resfd, const struct t_call *call) in _xti_accept() argument 57 return (_tx_accept(fd, resfd, call, TX_XTI_API)); in _xti_accept() 61 _xti_xns5_accept(int fd, int resfd, const struct t_call *call) in _xti_xns5_accept() argument 63 return (_tx_accept(fd, resfd, call, TX_XTI_XNS5_API)); in _xti_xns5_accept() 67 _xti_alloc(int fd, int struct_type, int fields) in _xti_alloc() argument 69 return (_tx_alloc(fd, struct_type, fields, TX_XTI_API)); in _xti_alloc() 73 _xti_bind(int fd, const struct t_bind *req, struct t_bind *ret) in _xti_bind() argument 75 return (_tx_bind(fd, req, ret, TX_XTI_API)); in _xti_bind() 79 _xti_close(int fd) in _xti_close() argument 81 return (_tx_close(fd, TX_XTI_API)); in _xti_close() [all …]
|
H A D | tli_wrappers.c | 42 t_accept(int fd, int resfd, struct t_call *call) in t_accept() argument 44 return (_tx_accept(fd, resfd, call, TX_TLI_API)); in t_accept() 48 t_alloc(int fd, int struct_type, int fields) in t_alloc() argument 50 return (_tx_alloc(fd, struct_type, fields, TX_TLI_API)); in t_alloc() 54 t_bind(int fd, struct t_bind *req, struct t_bind *ret) in t_bind() argument 56 return (_tx_bind(fd, req, ret, TX_TLI_API)); in t_bind() 60 t_close(int fd) in t_close() argument 62 return (_tx_close(fd, TX_TLI_API)); in t_close() 66 t_connect(int fd, struct t_call *sndcall, struct t_call *rcvcall) in t_connect() argument 68 return (_tx_connect(fd, sndcall, rcvcall, TX_TLI_API)); in t_connect() [all …]
|
/illumos-gate/usr/src/lib/libsqlite/tool/ |
H A D | speedtest.tcl | 15 set fd [open $sqlfile r] 16 set sql [string trim [read $fd [file size $sqlfile]]] 17 close $fd 75 set fd [open clear.sql w] 76 puts $fd { 80 close $fd 83 set fd [open 2kinit.sql w] 84 puts $fd { 88 close $fd 91 set fd [open nosync-init.sql w] [all …]
|
H A D | speedtest2.tcl | 15 set fd [open $sqlfile r] 16 set sql [string trim [read $fd [file size $sqlfile]]] 17 close $fd 67 set fd [open clear.sql w] 68 puts $fd { 72 close $fd 75 set fd [open 2kinit.sql w] 76 puts $fd { 80 close $fd 83 set fd [open nosync-init.sql w] [all …]
|
/illumos-gate/usr/src/tools/smatch/src/smatch_scripts/implicit_dependencies/with_structs/ |
H A D | implicit_dependencies_verbose | 1 {'accept4': [{'call': 'syncfs', 'reason': set([('fd', 'file')])}, 2 {'call': 'vmsplice', 'reason': set([('fd', 'file')])}, 3 {'call': 'pwritev64', 'reason': set([('fd', 'file')])}, 4 {'call': 'fremovexattr', 'reason': set([('fd', 'file')])}, 5 {'call': 'readahead', 'reason': set([('fd', 'file')])}, 6 {'call': 'getdents', 'reason': set([('fd', 'file')])}, 7 {'call': 'writev', 'reason': set([('fd', 'file')])}, 8 {'call': 'preadv64', 'reason': set([('fd', 'file')])}, 9 {'call': 'fchmod', 'reason': set([('fd', 'file')])}, 10 {'call': 'pread64', 'reason': set([('fd', 'file')])}, [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/isc/ |
H A D | ev_files.c | 38 static evFile *FindFD(const evContext_p *ctx, int fd, int eventmask); 42 int fd, in evSelectFD() argument 54 ctx, fd, eventmask, func, uap); in evSelectFD() 58 if (fd > ctx->highestFD) in evSelectFD() 61 OK(mode = fcntl(fd, F_GETFL, NULL)); /*%< side effect: validate fd. */ in evSelectFD() 70 if (fd >= ctx->maxnfds && evPollfdRealloc(ctx, 1, fd) != 0) in evSelectFD() 73 id = FindFD(ctx, fd, EV_MASK_ALL); in evSelectFD() 76 FD_SET(fd, &ctx->nonblockBefore); in evSelectFD() 80 OK(ioctl(fd, FIONBIO, (char *)&on)); in evSelectFD() 82 OK(fcntl(fd, F_SETFL, mode | PORT_NONBLOCK)); in evSelectFD() [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/msgs/ |
H A D | fifo_buffs.c | 51 ResetFifoBuffer(int fd) in ResetFifoBuffer() argument 56 if (fd >= FifoBufferTableSize) in ResetFifoBuffer() 59 if (FifoBufferTable [fd]) { in ResetFifoBuffer() 60 FifoBufferTable [fd]->full = 0; in ResetFifoBuffer() 61 FifoBufferTable [fd]->psave = in ResetFifoBuffer() 62 FifoBufferTable [fd]->psave_end = in ResetFifoBuffer() 63 FifoBufferTable [fd]->save; in ResetFifoBuffer() 70 GetFifoBuffer(int fd) in GetFifoBuffer() argument 72 if (fd < 0) { in GetFifoBuffer() 76 if ((fd >= FifoBufferTableSize) && (GrowFifoBufferTable (fd) < 0)) in GetFifoBuffer() [all …]
|
/illumos-gate/usr/src/lib/libproc/common/ |
H A D | proc_get_info.c | 59 int fd; in proc_get_cred() local 66 if ((fd = open(fname, O_RDONLY)) >= 0) { in proc_get_cred() 67 if (read(fd, credp, size) >= minsize) in proc_get_cred() 69 (void) close(fd); in proc_get_cred() 78 int fd; in proc_get_secflags() local 86 if ((fd = open(fname, O_RDONLY)) >= 0) { in proc_get_secflags() 87 if (read(fd, *psf, sizeof (prsecflags_t)) == in proc_get_secflags() 90 (void) close(fd); in proc_get_secflags() 108 int fd; in proc_get_priv() local 114 if ((fd = open(fname, O_RDONLY)) >= 0) { in proc_get_priv() [all …]
|
/illumos-gate/usr/src/cmd/format/ |
H A D | add_definition.c | 60 static void add_disktype(FILE *fd, struct disk_info *disk_info); 61 static void add_partition(FILE *fd, struct disk_info *, 63 static int add_entry(int col, FILE *fd, char *format, ...); 79 FILE *fd; in add_definition() local 145 if ((fd = fopen(filename, "a")) == NULL) { in add_definition() 156 (void) fprintf(fd, "#\n# New disk/partition type "); in add_definition() 158 (void) fprintf(fd, "#\n# New disk type "); in add_definition() 160 (void) fprintf(fd, "#\n# New partition type "); in add_definition() 163 (void) fprintf(fd, " saved on %s#\n", ctime(&clock)); in add_definition() 168 add_disktype(fd, cur_disk); in add_definition() [all …]
|
/illumos-gate/usr/src/tools/smatch/src/smatch_scripts/implicit_dependencies/without_structs/ |
H A D | implicit_dependencies_verbose.pretty | 447 'copy_file_range': [{'call': 'syncfs', 'reason': set([('fd', 'flags')])}, 448 {'call': 'vmsplice', 'reason': set([('fd', 'flags')])}, 450 'reason': set([('fd', 'flags')])}, 451 {'call': 'pwritev64', 'reason': set([('fd', 'flags')])}, 453 'reason': set([('fd', 'flags')])}, 454 {'call': 'readahead', 'reason': set([('fd', 'flags')])}, 455 {'call': 'getdents', 'reason': set([('fd', 'flags')])}, 456 {'call': 'writev', 'reason': set([('fd', 'flags')])}, 457 {'call': 'preadv64', 'reason': set([('fd', 'flags')])}, 458 {'call': 'fchmod', 'reason': set([('fd', 'flags')])}, [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | fio.c | 262 int size, ralloc, fd; in fd_find() local 267 for (fd = minfd; (uint_t)fd < fip->fi_nfiles; fd |= fd + 1) { in fd_find() 268 size = fd ^ (fd | (fd + 1)); in fd_find() 269 if (fip->fi_list[fd].uf_alloc == size) in fd_find() 272 ralloc += fip->fi_list[fd + size].uf_alloc; in fd_find() 273 if (fip->fi_list[fd].uf_alloc == ralloc + size) { in fd_find() 274 fd += size; in fd_find() 278 return (fd); in fd_find() 284 fd_reserve(uf_info_t *fip, int fd, int incr) in fd_reserve() argument 287 uf_entry_t *ufp = &fip->fi_list[fd]; in fd_reserve() [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/lp/ |
H A D | files.c | 79 fdprintf(int fd, char *fmt, ...) in fdprintf() argument 84 if (fd == 1) in fdprintf() 89 return (Write(fd, buf, (int)strlen(buf))); in fdprintf() 93 fdgets(char *buf, int len, int fd) in fdgets() argument 99 while ((count < len) && (Read(fd, &tmp, 1) > 0)) in fdgets() 108 fdputs(char *buf, int fd) in fdputs() argument 110 return (fdprintf(fd, "%s", buf)); in fdputs() 114 fdputc(char c, int fd) in fdputc() argument 116 if (fd == 1) in fdputc() 118 return (write(fd, &c, 1)); in fdputc() [all …]
|
/illumos-gate/usr/src/lib/print/libipp-core/common/ |
H A D | write.c | 115 ipp_write_attribute(ipp_writer_t iwrite, void *fd, papi_attribute_t *attribute) in ipp_write_attribute() argument 137 if (iwrite(fd, &type, 1) != 1) in ipp_write_attribute() 143 if (iwrite(fd, &length, 2) != 2) in ipp_write_attribute() 145 if (iwrite(fd, name, strlen(name)) != strlen(name)) in ipp_write_attribute() 150 if (iwrite(fd, &length, 2) != 2) in ipp_write_attribute() 162 if (iwrite(fd, &type, 1) != 1) in ipp_write_attribute() 168 if (iwrite(fd, &length, 2) != 2) in ipp_write_attribute() 170 if (iwrite(fd, name, strlen(name)) != strlen(name)) in ipp_write_attribute() 176 if (iwrite(fd, &length, 2) != 2) in ipp_write_attribute() 197 if (iwrite(fd, &length, 2) != 2) in ipp_write_attribute() [all …]
|
/illumos-gate/usr/src/ucblib/libucb/port/gen/ |
H A D | nlist.c | 97 int fd; in nlist() local 107 if ((fd = open(name, 0)) < 0) in nlist() 109 if (read(fd, magic_buf, (size_t)EI_NIDENT) == -1) { in nlist() 110 (void) close(fd); in nlist() 114 if (lseek(fd, 0L, 0) == -1L) { /* rewind to beginning of object file */ in nlist() 115 (void) close(fd); in nlist() 125 (void) close(fd); in nlist() 130 return (_elf_nlist(fd, list)); in nlist() 134 return (_coff_nlist(fd, list)); in nlist() 141 _elf_nlist(int fd, struct nlist *list) in _elf_nlist() argument [all …]
|
/illumos-gate/usr/src/cmd/fs.d/nfs/lib/ |
H A D | nfs_tbind.c | 128 static int setopt(int fd, int level, int name, int value); 129 static int get_opt(int fd, int level, int name); 130 static void nfslib_set_sockbuf(int fd); 140 int fd; in nfslib_transport_open() local 152 fd = t_open(nconf->nc_device, O_RDWR, (struct t_info *)NULL); in nfslib_transport_open() 153 if (fd == -1) { in nfslib_transport_open() 157 fd = t_open(nconf->nc_device, O_RDWR, in nfslib_transport_open() 160 if (fd == -1) { in nfslib_transport_open() 171 if (ioctl(fd, I_POP, 0) < 0) { in nfslib_transport_open() 173 (void) t_close(fd); in nfslib_transport_open() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | io.c | 220 int fd; in inetopen() local 274 fd = getaddrinfo(s, t, &hint, &addr); in inetopen() 277 fd = -1; in inetopen() 279 if (fd) in inetopen() 281 if (fd != EAI_SYSTEM) in inetopen() 287 fd = -1; in inetopen() 298 while ((fd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) >= 0) in inetopen() 300 …if (server && !bind(fd, p->ai_addr, p->ai_addrlen) && !listen(fd, 5) || !server && !connect(fd, p-… in inetopen() 302 close(fd); in inetopen() 303 fd = -1; in inetopen() [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) \ argument 48 #define XPUTC(ch, fd) { \ argument 49 if (putc((int) ch, fd) == EOF) \ 52 #define XFPUTS(string, fd) fputs(string, fd) argument 96 static void print_auto_depes(Dependency dependency, FILE *fd, Boolean built_this_run, int *line_le… 123 FILE *fd; in write_state_file() local 169 if ((fdes < 0) || (fd = fdopen(fdes, "w")) == NULL) { in write_state_file() 187 if ((fd = fopen(make_state_tempfile, "w")) == NULL) { in write_state_file() 202 (void) fclose(fd); in write_state_file() 216 if ((fdes < 0) || (fd = fdopen(fdes, "w")) == NULL) { in write_state_file() [all …]
|
/illumos-gate/usr/src/cmd/cdrw/ |
H A D | mmc.h | 126 int test_unit_ready(int fd); 127 int inquiry(int fd, uchar_t *inq); 128 int read_capacity(int fd, uchar_t *capbuf); 129 int read_track_info(int fd, int trackno, uchar_t *ti); 130 int mode_sense(int fd, uchar_t pc, int dbd, int page_len, uchar_t *buffer); 131 int mode_select(int fd, int page_len, uchar_t *buffer); 132 int read_toc(int fd, int format, int trackno, int buflen, uchar_t *buf); 133 int read_disc_info(int fd, uchar_t *di); 134 int get_configuration(int fd, uint16_t feature, int bufsize, uchar_t *buf); 135 int read10(int fd, uint32_t start_blk, uint16_t nblk, uchar_t *buf, [all …]
|
/illumos-gate/usr/src/lib/libcontract/common/ |
H A D | libcontract.c | 41 ct_tmpl_activate(int fd) in ct_tmpl_activate() argument 43 if (ioctl(fd, CT_TACTIVATE) == -1) in ct_tmpl_activate() 49 ct_tmpl_clear(int fd) in ct_tmpl_clear() argument 51 if (ioctl(fd, CT_TCLEAR) == -1) in ct_tmpl_clear() 57 ct_tmpl_create(int fd, ctid_t *ctidp) in ct_tmpl_create() argument 59 ctid_t ctid = ioctl(fd, CT_TCREATE); in ct_tmpl_create() 67 ct_tmpl_set_internal(int fd, uint_t id, uintptr_t value) in ct_tmpl_set_internal() argument 75 if (ioctl(fd, CT_TSET, ¶m) == -1) in ct_tmpl_set_internal() 82 ct_tmpl_set_internal_string(int fd, uint_t id, const char *value) in ct_tmpl_set_internal_string() argument 91 if (ioctl(fd, CT_TSET, ¶m) == -1) in ct_tmpl_set_internal_string() [all …]
|
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/ |
H A D | libfruaccess.c | 152 int fd; in fru_get_num_sections() local 154 if ((fd = fru_open_dev()) == -1) { in fru_get_num_sections() 159 if (ioctl(fd, SGFRU_GETNUMSECTIONS, &numsections) != 0) { in fru_get_num_sections() 171 int fd; in fru_get_sections() local 173 if ((fd = fru_open_dev()) == -1) { in fru_get_sections() 179 if (ioctl(fd, SGFRU_GETSECTIONS, §ions) != 0) { in fru_get_sections() 190 int fd; in fru_get_num_segments() local 192 if ((fd = fru_open_dev()) == -1) { in fru_get_num_segments() 197 if (ioctl(fd, SGFRU_GETNUMSEGMENTS, &numsegments) != 0) { in fru_get_num_segments() 209 int fd; in fru_get_segments() local [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/forms/ |
H A D | wrform.c | 58 wrform(char *name, FORM *formp, int fd, int (*error_handler)( int , int , int ), in wrform() argument 75 print_sdn(fd, HEAD, formp->plen); in wrform() 79 print_sdn(fd, HEAD, formp->pwid); in wrform() 83 print_sdn(fd, HEAD, formp->lpi); in wrform() 88 print_str(fd, HEAD, NAME_COMPRESSED); in wrform() 90 print_sdn(fd, HEAD, formp->cpi); in wrform() 94 fdprintf(fd, "%s %d\n", HEAD, formp->np); in wrform() 98 fdprintf(fd, "%s %s", HEAD, formp->chset); in wrform() 100 fdprintf(fd, ",%s", MANSTR); in wrform() 101 fdprintf(fd, "\n"); in wrform() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/aso/ |
H A D | aso-fcntl.c | 38 int fd; 52 int fd; 65 if (fcntl(apl->fd, F_SETLKW, &lock) >= 0) 67 if (lseek(apl->fd, apl->size, SEEK_SET) != apl->size) 69 else if (read(apl->fd, &references, sizeof(references)) != sizeof(references)) 74 if (lseek(apl->fd, apl->size, SEEK_SET) != apl->size) 76 else if (write(apl->fd, &references, sizeof(references)) != sizeof(references)) 80 fcntl(apl->fd, F_SETLK, &lock); 84 close(apl->fd); 88 fd = -1; [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/requests/ |
H A D | putrequest.c | 65 int fd; local 117 if ((fd = open_locked(path, "w", MODE_NOREAD)) < 0) { 128 (void)fdprintf(fd, "%s%d\n", HEAD, reqbufp->copies); 132 (void)fdprintf(fd, "%s%s\n", HEAD, reqbufp->destination); 137 (void)fdprintf(fd, "%s%s\n", HEAD, *pp); 142 (void)fdprintf(fd, "%s%s\n", HEAD, reqbufp->form); 147 (void)fdprintf(fd, "%s%s\n", HEAD, NAME_IMMEDIATE); 149 (void)fdprintf(fd, "%s%s\n", HEAD, NAME_RESUME); 151 (void)fdprintf(fd, "%s%s\n", HEAD, NAME_HOLD); 156 (void)fdprintf(fd, "%sM\n", HEAD); [all …]
|
/illumos-gate/usr/src/cmd/ttymon/ |
H A D | tmterm.c | 60 set_termio(int fd, char *options, char *aspeed, int clear, long mode) in set_termio() argument 79 if ((term = get_ttymode(fd, &termio, &termios, &stermio, in set_termio() 115 if (set_ttymode(fd, term, &termio, &termios, &stermio, in set_termio() 129 turnon_canon(int fd) in turnon_canon() argument 136 if (ioctl(fd, TCGETA, &termio) != 0) { in turnon_canon() 137 log("turnon_canon: TCGETA failed, fd = %d: %s", fd, in turnon_canon() 144 if (ioctl(fd, TCSETA, &termio) != 0) { in turnon_canon() 145 log("turnon_canon: TCSETA failed, fd = %d: %s", fd, in turnon_canon() 157 flush_input(int fd) in flush_input() argument 159 if (ioctl(fd, I_FLUSH, FLUSHR) == -1) in flush_input() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/ |
H A D | mkservice.c | 118 short fd; member 136 static int fdclose(Service_t *sp, register int fd) in fdclose() argument 139 service_list[fd] = 0; in fdclose() 140 if(sp->fd==fd) in fdclose() 141 sp->fd = -1; in fdclose() 144 if(file_list[i]==fd) in fdclose() 148 (*sp->actionf)(sp, fd, 1); in fdclose() 185 int r=0, fd = sffileno(iop); in process_stream() local 186 Service_t * sp = service_list[fd]; in process_stream() 187 if(fd==sp->fd) /* connection socket */ in process_stream() [all …]
|