Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 1959) sorted by relevance

12345678910>>...79

/illumos-gate/usr/src/lib/libnsl/nsl/
H A Dxti_wrappers.c55 _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 Dtli_wrappers.c42 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 Dspeedtest.tcl15 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 Dspeedtest2.tcl15 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 Dimplicit_dependencies_verbose1 {'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 Dev_files.c38 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 Dfifo_buffs.c51 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 Dproc_get_info.c58 int fd; in proc_get_cred() local
65 if ((fd = open(fname, O_RDONLY)) >= 0) { in proc_get_cred()
66 if (read(fd, credp, size) >= minsize) in proc_get_cred()
68 (void) close(fd); in proc_get_cred()
77 int fd; in proc_get_secflags() local
85 if ((fd = open(fname, O_RDONLY)) >= 0) { in proc_get_secflags()
86 if (read(fd, *psf, sizeof (prsecflags_t)) == in proc_get_secflags()
89 (void) close(fd); in proc_get_secflags()
107 int fd; in proc_get_priv() local
113 if ((fd = open(fname, O_RDONLY)) >= 0) { in proc_get_priv()
[all …]
/illumos-gate/usr/src/cmd/format/
H A Dadd_definition.c60 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 Dimplicit_dependencies_verbose.pretty447 '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/cmd/lp/lib/lp/
H A Dfiles.c79 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 Dwrite.c115 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 Dnlist.c97 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/uts/common/os/
H A Dfio.c260 int size, ralloc, fd; in fd_find() local
265 for (fd = minfd; (uint_t)fd < fip->fi_nfiles; fd |= fd + 1) { in fd_find()
266 size = fd ^ (fd | (fd + 1)); in fd_find()
267 if (fip->fi_list[fd].uf_alloc == size) in fd_find()
270 ralloc += fip->fi_list[fd + size].uf_alloc; in fd_find()
271 if (fip->fi_list[fd].uf_alloc == ralloc + size) { in fd_find()
272 fd += size; in fd_find()
276 return (fd); in fd_find()
282 fd_reserve(uf_info_t *fip, int fd, int incr) in fd_reserve() argument
285 uf_entry_t *ufp = &fip->fi_list[fd]; in fd_reserve()
[all …]
/illumos-gate/usr/src/cmd/fs.d/nfs/lib/
H A Dnfs_tbind.c128 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 Dio.c220 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 Dstate.cc46 #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 Dmmc.h126 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 Dlibcontract.c41 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, &param) == -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, &param) == -1) in ct_tmpl_set_internal_string()
[all …]
/illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/
H A Dlibfruaccess.c152 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, &sections) != 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 Dwrform.c58 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 Daso-fcntl.c38 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 Dputrequest.c65 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 Dtmterm.c60 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 Dmkservice.c118 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 …]

12345678910>>...79