Searched refs:fd (Results 401 - 425 of 1995) sorted by relevance

<<11121314151617181920>>

/illumos-gate/usr/src/uts/common/syscall/
H A Dchmod.c50 fchmodat(int fd, char *path, int mode, int flag) argument
63 error = fsetattrat(fd, path, flag, &vattr);
82 fchmod(int fd, int mode) argument
84 return (fchmodat(fd, NULL, mode, 0));
/illumos-gate/usr/src/boot/lib/libstand/
H A Dpager.c128 * Display from (fd).
135 int fd; local
138 if ((fd = open(fname, O_RDONLY)) == -1) {
144 hmuch = read(fd, buf, sizeof(buf) - 1);
159 close(fd);
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/
H A Dsetup.c123 getnum(int fd) argument
127 if (read(fd, bytes, 2) != 2)
170 int fd; local
177 if ((fd = open(filename, 0)) < 0) {
181 if ((header.magic = getnum(fd)) != __TERMINFO_MAGIC ||
182 (header.name_size = getnum(fd)) < 0 ||
183 (header.bool_count = getnum(fd)) < 0 ||
184 (header.num_count = getnum(fd)) < 0 ||
185 (header.str_count = getnum(fd)) < 0 ||
186 (header.str_size = getnum(fd)) <
425 restartterm(char *tm, int fd, int *err_return) argument
609 int fd; local
[all...]
/illumos-gate/usr/src/lib/libnsl/nsl/
H A Dt_look.c45 _tx_look(int fd, int api_semantics) argument
52 if ((tiptr = _t_checkfd(fd, 0, api_semantics)) == NULL)
60 state = _t_look_locked(fd, tiptr, do_expinline_peek, api_semantics);
76 int fd,
131 retval = ioctl(fd, I_PEEK, &strpeek);
190 retval = _t_expinline_queued(fd, &exp_on_q);
231 retval = _t_expinline_queued(fd, &exp_on_q);
75 _t_look_locked( int fd, struct _ti_user *tiptr, int do_expinline_peek, int api_semantics ) argument
/illumos-gate/usr/src/cmd/fm/modules/common/fabric-xlate/
H A Dfabric-xlate.c55 int fd = -1; local
58 while (fd == -1) {
63 fd = open(XMLTOPOFILE, O_RDWR | O_CREAT | O_EXCL, 0600);
64 if ((fd == -1) && (errno != EEXIST)) {
71 if ((fp = fdopen(fd, "w")) == NULL) {
105 else if (fd != -1)
106 (void) close(fd);
/illumos-gate/usr/src/cmd/ipf/lib/common/
H A Dipft_sn.c57 int fd; local
64 fd = 0;
65 else if ((fd = open(fname, O_RDONLY)) == -1)
68 if (read(fd, (char *)&sh, sizeof(sh)) != sizeof(sh))
76 (void) close(fd);
80 sfd = fd;
84 return fd;
/illumos-gate/usr/src/cmd/keyserv/
H A Dkey_generic.c85 int fd; local
114 if ((fd = t_open(nconf->nc_device, O_RDWR, NULL)) < 0) {
127 if (__rpc_negotiate_uid(fd) != 0) {
131 t_close(fd);
135 bind_addr = (struct t_bind *)t_alloc(fd, T_BIND, T_ADDR);
137 t_close(fd);
158 xprt = svc_tli_create(fd, nconf, bind_addr, 0, 0);
/illumos-gate/usr/src/cmd/tip/aculib/
H A Dbiz31.c195 bizsync(int fd) argument
211 if (ioctl(fd, IOCTL, (caddr_t)&b) >= 0 && chars(b) > 0)
212 (void) ioctl(fd, TCFLSH, TCIOFLUSH);
213 (void) write(fd, "\rp>\r", 4);
215 if (ioctl(fd, IOCTL, (caddr_t)&b) >= 0) {
220 (void) write(fd, DISCONNECT_CMD, 4);
225 (void) read(fd, buf, 10);
/illumos-gate/usr/src/test/libc-tests/tests/random/
H A Dinz_inval.c36 int ret, fd; local
84 fd = mkstemp(tmpfile);
85 assert(fd >= 0);
86 ret = ftruncate(fd, mapsz);
90 buf = mmap(NULL, mapsz, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
99 buf = mmap(NULL, mapsz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
107 ret = close(fd);
/illumos-gate/usr/src/lib/print/libpapi-lpd/common/
H A Dlpd-misc.c48 fdgets(char *buf, size_t len, int fd) argument
54 while ((count < len) && (read(fd, &tmp, 1) > 0))
82 int fd = -1; local
88 fd = recv_fd.fd;
107 msg.msg_accrights = (caddr_t)&fd;
108 msg.msg_accrights = sizeof (fd);
116 fd = -1;
119 fd = * (int *)CMSG_DATA(cmp);
122 return (fd);
[all...]
/illumos-gate/usr/src/lib/librpcsvc/common/
H A Dbindresvport.c69 int fd; local
96 if (!clnt_control(cl, CLGET_FD, (char *)&fd)) {
100 /* If fd is already bound - unbind it */
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, tbin
[all...]
/illumos-gate/usr/src/lib/libdhcpagent/common/
H A Ddhcpagent_util.c89 int fd; local
92 fd = open64(CTFS_ROOT "/process/template", O_RDWR);
93 if (fd == -1)
99 err |= ct_tmpl_set_critical(fd, 0);
100 err |= ct_tmpl_set_informative(fd, 0);
101 err |= ct_pr_tmpl_set_fatal(fd, CT_PR_EV_HWERR);
102 err |= ct_pr_tmpl_set_param(fd, CT_PR_PGRPONLY | CT_PR_REGENT);
103 if (err != 0 || ct_tmpl_activate(fd) != 0) {
104 (void) close(fd);
108 return (fd);
[all...]
/illumos-gate/usr/src/lib/libnsctl/common/
H A Dmachdep.c57 int fd; local
67 if ((fd = open("/dev/ncall", O_RDONLY)) < 0) {
70 if ((size = ioctl(fd, NC_IOC_GETNETNODES, NULL)) < 1) {
81 rc = ioctl(fd, ioctlcmd, mynodelist);
92 close(fd);
110 int fd; local
114 fd = open("/dev/ncall", O_RDONLY);
115 if (fd < 0)
120 rval = ioctl(fd, NC_IOC_GETNODE, &node);
132 close(fd);
[all...]
/illumos-gate/usr/src/lib/libbc/libc/sys/4.2/
H A Dfcntl.c78 int fcntl(fd, cmd, arg)
79 int fd, cmd, arg;
81 return(bc_fcntl(fd, cmd, arg));
85 int bc_fcntl(fd, cmd, arg)
86 int fd, cmd, arg;
95 ret = _s_fcntl(fd, cmd_op[cmd], arg);
100 if (_ioctl(fd, S5_I_GETSIG, &i) < 0) {
112 return (ioctl(fd, S5_I_SETSIG, i));
151 ret = _s_fcntl(fd, cmd_op[cmd], arg);
155 if ((fds = fd_get(fd)) !
[all...]
/illumos-gate/usr/src/lib/libbc/libc/sys/sys5/
H A Dfcntl.c76 int fcntl(fd, cmd, arg)
77 int fd, cmd, arg;
79 return(bc_fcntl(fd, cmd, arg));
82 int bc_fcntl(fd, cmd, arg)
83 int fd, cmd, arg;
92 ret = _s_fcntl(fd, cmd_op[cmd], arg);
97 if (_ioctl(fd, S5_I_GETSIG, &i) < 0) {
109 return (ioctl(fd, S5_I_SETSIG, i));
146 ret = _s_fcntl(fd, cmd_op[cmd], arg);
150 if ((fds = fd_get(fd)) !
[all...]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dnftw.c136 DIR *fd; member in struct:Save
191 this.fd = 0;
221 if ((this.fd = (*vp->opendirf)(comp)) == 0) {
223 (this.fd = (*vp->opendirf)(comp)) != 0) {
226 * are OPEN_MAX fd in the calling
228 * fd, and another opendirf doesn't
322 (fstat(this.fd->dd_fd, &statb2) < 0 ||
330 if ((cdval = fchdir(this.fd->dd_fd)) >= 0) {
369 while (dir = readdir(this.fd)) {
425 if (this.fd
635 int fd; local
658 int fd; local
691 int fd, cfd; local
[all...]
/illumos-gate/usr/src/cmd/iscsitsvc/
H A Discsitsvc.c87 * fd - Return the iscsit file descriptor
90 it_open(int *fd) argument
95 *fd = open(ISCSIT_NODE, O_RDONLY);
96 if (*fd < 0) {
118 int fd; local
131 if ((ret = it_open(&fd)) != ITADM_SUCCESS) {
136 (void) fprintf(stdout, "it_enable [fd=%d]\n", fd);
157 if ((ret = ioctl(fd, ISCSIT_IOC_ENABLE_SVC, &hostinfo)) != 0) {
174 int fd; local
[all...]
/illumos-gate/usr/src/cmd/ttymon/
H A Dtmutil.c171 int i, fd; local
208 if ((fd = open(USERDEV, O_RDWR)) == -1) {
216 if ( (i = ioctl(fd, SAD_VML, &newlist)) < 0 ) {
219 (void)close(fd);
224 (void)close(fd);
227 (void)close(fd);
253 int fd; local
260 if ((fd = open(CONSOLE, O_WRONLY|O_NOCTTY)) != -1)
261 (void) write(fd, buf, strlen(buf) + 1);
262 (void) close(fd);
[all...]
/illumos-gate/usr/src/psm/promif/ieee1275/sun4/
H A Dprom_fio.c76 return (p1275_cell2int(ci[9])); /* Res2: fd */
123 return (p1275_cell2int(ci[9])); /* Res2: fd */
127 prom_fseek(ihandle_t fsih, int fd, unsigned long long offset) argument
136 ci[5] = p1275_int2cell(fd); /* Arg3: file desc */
154 prom_fread(ihandle_t fsih, int fd, caddr_t buf, size_t len) argument
175 ci[5] = p1275_int2cell(fd); /* Arg3: file desc */
197 prom_fsize(ihandle_t fsih, int fd, size_t *size) argument
208 ci[5] = p1275_int2cell(fd); /* Arg3: file desc */
223 prom_compinfo(ihandle_t fsih, int fd, int *iscmp, size_t *fsize, size_t *bsize) argument
234 ci[5] = p1275_int2cell(fd); /* Arg
250 prom_fclose(ihandle_t fsih, int fd) argument
[all...]
/illumos-gate/usr/src/lib/libast/common/sfio/
H A D_sfopen.c46 int fd, oldfd, oflags, sflags; local
97 while((fd = sysopenf((char*)file,oflags,SF_CREATMODE)) < 0 && errno == EINTR)
100 while((fd = sysopenf(file,oflags&O_ACCMODE)) < 0 && errno == EINTR)
102 if(fd >= 0)
104 { CLOSE(fd); /* error: file already exists */
116 { while((fd = syscreatf(file,SF_CREATMODE)) < 0 && errno == EINTR)
120 CLOSE(fd);
121 while((fd = sysopenf(file,oflags&O_ACCMODE)) < 0 &&
127 if(fd < 0)
132 if((f = sfnew(f,NIL(char*),(size_t)SF_UNBOUND,fd,sflag
[all...]
/illumos-gate/usr/src/lib/libpkg/common/
H A Disdir.c174 int fd; local
179 if ((fd = open(path, O_RDONLY, 0)) == -1) {
186 if (fstat(fd, &statb) == -1) {
189 (void) close(fd);
193 if (read(fd, cm.c_mag, sizeof (cm.c_mag)) !=
198 (void) close(fd);
209 (void) close(fd);
215 (void) close(fd);
218 (void) close(fd);
221 (void) close(fd);
[all...]
/illumos-gate/usr/src/lib/libsldap/common/
H A Dns_trace.c77 int fd; local
98 fd = open(val, O_WRONLY | O_CREAT, 0644);
100 fd = __ns_ldap_raise_fd(fd);
102 *((int *)opt->address) = fd;
/illumos-gate/usr/src/lib/libcontract/common/
H A Dprocess.c42 ct_pr_tmpl_set_transfer(int fd, ctid_t ctid) argument
44 return (ct_tmpl_set_internal(fd, CTPP_SUBSUME, ctid));
48 ct_pr_tmpl_set_fatal(int fd, uint_t events) argument
50 return (ct_tmpl_set_internal(fd, CTPP_EV_FATAL, events));
54 ct_pr_tmpl_set_param(int fd, uint_t param) argument
56 return (ct_tmpl_set_internal(fd, CTPP_PARAMS, param));
60 ct_pr_tmpl_set_svc_fmri(int fd, const char *fmri) argument
62 return (ct_tmpl_set_internal_string(fd, CTPP_SVC_FMRI, fmri));
66 ct_pr_tmpl_set_svc_aux(int fd, const char *desc) argument
68 return (ct_tmpl_set_internal_string(fd, CTPP_CREATOR_AU
72 ct_pr_tmpl_get_transfer(int fd, ctid_t *ctid) argument
78 ct_pr_tmpl_get_fatal(int fd, uint_t *events) argument
84 ct_pr_tmpl_get_param(int fd, uint_t *param) argument
90 ct_pr_tmpl_get_svc_fmri(int fd, char *fmri, size_t size) argument
96 ct_pr_tmpl_get_svc_aux(int fd, char *desc, size_t size) argument
[all...]
/illumos-gate/usr/src/lib/libdtrace/common/
H A Ddlink_common.c106 int fd; local
140 if ((fd = open64(devname, O_RDWR)) < 0) {
152 if ((fd = open64(devname, O_RDWR)) < 0) {
158 if (ioctl(fd, DTRACEHIOC_ADDDOF, &dh) == -1) {
165 (void) close(fd);
/illumos-gate/usr/src/lib/libc/port/stdio/
H A Dsetvbuf.c50 int fd = GET_FD(iop); local
59 if (fd < 2) {
61 buf = (fd == 0) ? _sibuf : _sobuf;
65 if (fd < _NFILE) {
66 buf = _smbuf[fd];

Completed in 140 milliseconds

<<11121314151617181920>>