Searched refs:fd (Results 276 - 300 of 1995) sorted by relevance

<<11121314151617181920>>

/illumos-gate/usr/src/cmd/print/conv_fix/
H A Dconv_fix.c120 int fd; local
122 fd = open(ofile, O_RDWR|O_APPEND);
123 if ((fd < 0) && (errno == ENOENT))
124 fd = open(ofile, O_RDWR|O_CREAT|O_EXCL, 0644);
126 if (fd < 0) {
132 lseek(fd, 0, SEEK_END);
134 if ((fp2 = fdopen(fd, "a")) != NULL) {
/illumos-gate/usr/src/cmd/format/
H A Ddisk_generic.c67 static int generic_rdwr(int dir, int fd, diskaddr_t blkno, int secnt,
111 generic_rdwr(dir, fd, blkno, secnt, bufaddr, flags, xfercntp)
113 int fd;
132 status = llseek(fd, tmpblk, SEEK_SET);
138 status = read(fd, bufaddr, (size_t)tmpsec);
144 status = llseek(fd, tmpblk, SEEK_SET);
150 status = write(fd, bufaddr, (size_t)tmpsec);
/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Dfflush.c51 int fd; local
67 SM_CONVERT_TIME(fp, fd, timeout, &to);
97 int fd; local
116 if ((fd = sm_io_getinfo(fp, SM_IO_WHAT_FD, NULL)) == -1)
118 /* can't get an fd, likely internal 'fake' fp */
120 fd = -1;
142 if (IS_IO_ERROR(fd, t, *timeout))
149 SM_IO_WR_TIMEOUT(fp, fd, *timeout);
/illumos-gate/usr/src/lib/sun_fc/common/
H A DTrace.cc70 int fd; local
76 fd = open(DEBUG_FILE, O_WRONLY|O_APPEND); /* will only open if exists */
77 if (fd == -1) {
82 fd = open(LOG_FILE, O_WRONLY|O_APPEND);
109 if (fd != -1) {
122 write(fd, message, strlen(message));
123 close(fd);
/illumos-gate/usr/src/cmd/lp/lib/access/
H A Dloadaccess.c129 int fd; local
134 if ((fd = open_locked(file, "r", 0)) < 0)
144 close(fd);
150 for (nlist = 0; fdgets(buf, BUFSIZ, fd); ) {
164 close(fd);
176 close(fd);
181 close(fd);
/illumos-gate/usr/src/uts/common/avs/ns/nsctl/
H A Dnsc_cache.c87 nsc_alloc_handle(nsc_fd_t *fd, void (*d_cb)(), void (*r_cb)(), void (*w_cb)()) argument
89 nsc_buf_t *h = (*fd->sf_aio->alloc_h)(d_cb, r_cb, w_cb, fd->sf_cd);
92 h->sb_fd = fd;
150 nsc_alloc_buf(nsc_fd_t *fd, nsc_off_t pos, nsc_size_t len, argument
155 if ((fd->sf_avail & NSC_WRITE) == 0)
177 fn = fd->sf_aio->alloc_buf;
178 (*ptr)->sb_fd = fd;
181 return (*fn)(fd->sf_cd, pos, len, flag, ptr, fd);
188 _nsc_alloc_buf_h(blind_t cd, nsc_off_t pos, nsc_size_t len, int flag, nsc_buf_t **ptr, nsc_fd_t *fd) argument
442 nsc_set_trksize(nsc_fd_t *fd, nsc_size_t trsize) argument
449 nsc_get_pinned(nsc_fd_t *fd) argument
456 nsc_discard_pinned(nsc_fd_t *fd, nsc_off_t pos, nsc_size_t len) argument
465 nsc_fd_t *fd; local
485 nsc_fd_t *fd; local
[all...]
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/ftp/
H A Dsecure.c32 * Only one security context, thus only work on one fd at a time!
59 looping_write(int fd, const char *buf, int len) argument
67 cc = write(fd, buf, len);
84 looping_read(int fd, char *buf, int len) argument
89 cc = read(fd, buf, len);
152 secure_putbyte(int fd, uchar_t c) argument
164 ret = secure_putbuf(fd, ucbuf, smaxqueue);
177 secure_flush(int fd) argument
184 if (ret = secure_putbuf(fd, ucbuf, nout))
186 return (secure_putbuf(fd, (uchar_
210 secure_write(int fd, const void *inbuf, size_t nbyte) argument
230 secure_putbuf(int fd, uchar_t *buf, uint_t nbyte) argument
287 secure_getbyte(int fd) argument
367 secure_read(int fd, void *inbuf, size_t nbyte) argument
[all...]
/illumos-gate/usr/src/cmd/tic/
H A Dtic_read.c125 int fd; local
145 fd = open(filename, 0);
147 if (fd < 0)
150 read(fd, &header, sizeof (header));
162 close(fd);
166 read(fd, TermNames, min(127, header.name_size));
169 lseek(fd, (long)(header.name_size - 127), 1);
174 read(fd, UB, min(BoolCount, header.bool_count));
176 lseek(fd, (long)(header.bool_count - BoolCount), 1);
182 read(fd,
[all...]
/illumos-gate/usr/src/cmd/sendmail/db/db/
H A Ddb_region.c61 infop->fd = -1;
129 infop->file, infop->dbflags, &infop->fd, &infop->name)) != 0)
131 if (infop->fd != -1)
141 if (infop->fd == -1 && infop->dbflags & DB_CREATE) {
145 flags, flags, infop->mode, &infop->fd)) == 0)
153 if (infop->fd == -1) {
157 flags, flags, infop->mode, &infop->fd)) != 0)
228 infop->fd, &mbytes, &bytes, NULL)) != 0)
242 __os_read(infop->fd, &rl, sizeof(rl), &nr)) != 0)
323 (ret = __db_mutex_lock(&rlp->lock, infop->fd)) !
592 int fd, ret, t_ret; local
[all...]
/illumos-gate/usr/src/lib/libm/common/m9x/
H A Dfex_log.c197 static void print_stack(int fd, char *addr, struct frame *fp) argument
204 write(fd, buf, sprintf(buf, " 0x%0" PDIG "lx ",
206 write(fd, name, strlen(name));
207 write(fd, "\n", 1);
211 write(fd, buf, sprintf(buf, " 0x%0" PDIG "lx\n",
226 int fd; local
259 fd = fileno(log_fp);
260 write(fd, "fex_log_entry: ", 15);
261 write(fd, msg, strlen(msg));
262 write(fd, "\
289 int fd; local
[all...]
/illumos-gate/usr/src/lib/libast/common/vmalloc/
H A Dvmmopen.c80 int fd; /* file descriptor */ member in struct:_mmvmdisc_s
94 int fd; local
100 if((fd = open(file, O_RDWR, CREAT_MODE)) >= 0)
101 { if((size = lseek(fd, (off_t)0, 2)) < 0)
107 if(lseek(fd, (off_t)0, 0) != (off_t)0)
109 if(read(fd, mm, sizeof(Mmvm_t)) != sizeof(Mmvm_t))
115 MAP_FIXED|MAP_SHARED, fd, (off_t)0 );
120 { if((fd = open(file, O_RDWR|O_CREAT, CREAT_MODE)) < 0)
125 if(lseek(fd, size-1, 0) != (size-1) || write(fd, "",
256 int fd; local
[all...]
/illumos-gate/usr/src/lib/print/libpapi-lpd/common/
H A Dlpd-port.c62 sendfd(int sockfd, int fd) argument
64 syslog(LOG_DEBUG, "sendfd(%d, %d)", sockfd, fd);
67 return (ioctl(sockfd, I_SENDFD, fd));
81 * (int *)CMSG_DATA(cmp) = fd;
90 msg.msg_accrights = (caddr_t)&fd;
91 msg.msg_accrights = sizeof (fd);
185 int fd, result = getpid() % 1000; local
199 if (((fd = open(JOB_ID_FILE, O_RDWR)) < 0) && (errno == ENOENT))
200 fd = open(JOB_ID_FILE, O_CREAT|O_EXCL|O_RDWR, 0644);
202 syslog(LOG_DEBUG, "sequence file fd
385 send_lpd_message(int fd, char *fmt, ...) argument
417 int fd = -1; local
503 int fd, err; local
609 query(int fd, char *printer, int ac, char **av) argument
630 cancel(int fd, char *printer, int ac, char **av) argument
685 int fd, c, timeout = 0, exit_code = 0; local
[all...]
/illumos-gate/usr/src/lib/libproc/common/
H A DPfdinfo.c42 Pfd2info(struct ps_prochandle *P, int fd) argument
54 if (fip->fd_info.pr_fd == fd) {
57 if (fip->fd_info.pr_fd < fd) {
66 fip->fd_info.pr_fd = fd;
93 int fd; local
114 fd = atoi(ent->d_name);
116 fip = Pfd2info(P, fd);
118 info->pr_fd = fd;
120 if (pr_fstat64(P, fd, &stat) == 0) {
132 info->pr_fileflags = pr_fcntl(P, fd, F_GETXF
[all...]
/illumos-gate/usr/src/cmd/svr4pkg/libinst/
H A Dlockinst.c94 wrlockdata(int fd, int this_pid, char *this_name, argument
106 (void) lseek(fd, 0, SEEK_SET);
107 if (write(fd, lockbuf, LF_SIZE) == LF_SIZE)
122 rdlockdata(int fd) argument
124 (void) lseek(fd, 0, SEEK_SET);
125 if (read(fd, lockbuf, LF_SIZE) != LF_SIZE) {
176 int fd, retry_cnt; local
189 if ((fd = open(lockpath, O_RDWR | O_CREAT, 0600)) == -1) {
194 lock_fd = fd;
208 if (lockf(fd, F_LOC
[all...]
/illumos-gate/usr/src/boot/sys/boot/i386/gptzfsboot/
H A Dzfsboot.c92 static const char *const dev_nm[NDEV] = {"ad", "da", "fd"};
135 int fd; member in struct:probe_args
151 lseek(ppa->fd, offset * ppa->secsz, SEEK_SET);
152 if (read(ppa->fd, buf, size) == size)
176 pa.fd = open(devname, O_RDONLY);
177 if (pa.fd == -1)
187 close(pa.fd);
216 pa.fd = open(devname, O_RDONLY);
217 if (pa.fd == -1) {
221 ret = ioctl(pa.fd, DIOCGMEDIASIZ
239 int auto_boot, i, fd, ret; local
400 int fd, fmt, i, j; local
554 int fd; local
[all...]
/illumos-gate/usr/src/lib/efcode/efdaemon/
H A Defdaemon.c57 int c, fd, nbytes, status; local
81 if ((fd = open(dev_fcode_file, O_RDONLY)) < 0) {
92 close(fd);
125 while ((fd = open(dev_fcode_file, O_RDONLY)) < 0) {
137 nbytes = read(fd, &tc, sizeof (tc));
141 close(fd);
174 if (ioctl(fd, FC_SET_FCODE_ERROR, &error) < 0) {
181 close(fd);
187 fcntl(fd, F_DUP2FD, 0);
/illumos-gate/usr/src/lib/libnsl/rpc/
H A Drpc_soc.c81 int fd = *sockp; local
94 if (fd == RPC_ANYSOCK) {
95 fd = t_open(nconf->nc_device, O_RDWR, &tinfo);
96 if (fd == -1)
98 RPC_RAISEFD(fd);
101 if (t_getinfo(fd, &tinfo) == -1)
126 (void) __rpc_bindresvport(fd, NULL, &port, 0);
127 cl = clnt_tli_create(fd, nconf, &bindaddr, prog, vers,
132 * The fd should be closed while destroying the handle.
135 *sockp = fd;
195 svc_com_create(int fd, uint_t sendsize, uint_t recvsize, char *netid) argument
240 svctcp_create(int fd, uint_t sendsize, uint_t recvsize) argument
246 svcudp_bufcreate(int fd, uint_t sendsz, uint_t recvsz) argument
252 svcfd_create(int fd, uint_t sendsize, uint_t recvsize) argument
259 svcudp_create(int fd) argument
278 __rpc_bindresvport_ipv6(int fd, struct sockaddr *sin, int *portp, int qlen, char *fmly) argument
368 __rpc_bindresvport(int fd, struct sockaddr_in *sin, int *portp, int qlen) argument
519 int fd; local
[all...]
/illumos-gate/usr/src/lib/libinetutil/common/
H A Difaddrlist.c63 int fd; local
72 if ((fd = socket(family, SOCK_DGRAM, 0)) == -1) {
83 if (ioctl(fd, SIOCGLIFNUM, &lifn) == -1) {
102 if (ioctl(fd, SIOCGLIFCONF, &lifc) == -1) {
134 if (ioctl(fd, SIOCGLIFFLAGS, lifrp) == -1) {
142 if (ioctl(fd, SIOCGLIFINDEX, lifrp) == -1) {
150 if (ioctl(fd, SIOCGLIFADDR, lifrp) == -1) {
168 (void) close(fd);
188 (void) close(fd);
/illumos-gate/usr/src/cmd/sgs/libelf/demo/
H A Dpcom.c108 process_elf(Elf *elf, char *file, int fd, int member) argument
130 while ((_elf = elf_begin(fd, cmd, elf)) != NULL) {
145 process_elf(_elf, buffer, fd, 1);
180 int fd; local
185 if ((fd = open(elf_fname, O_RDONLY)) == -1) {
194 if ((elf = elf_begin(fd, ELF_C_READ, 0)) == NULL) {
197 (void) close(fd);
204 process_elf(elf, elf_fname, fd, 0);
206 (void) close(fd);
/illumos-gate/usr/src/cmd/ttymon/
H A Dtmpeek.c77 fds[0].fd = 0;
100 ptr = do_peek(fds[0].fd, 255);
102 return(process(fds[0].fd,ptr));
119 int fd, /* fd to read data from if necessary */
127 (void) read(fd, junk, i+1);
131 (void) read(fd, junk, ptr->len);
153 do_peek(fd,n)
154 int fd; /* fd t
118 process( int fd, struct strbuf *ptr) argument
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dlock_file.c65 krb5_lock_file(krb5_context context, int fd, int mode) argument
111 if (fcntl(fd, lock_cmd, &lock_arg) == -1) {
123 if (flock(fd, lock_flag) == -1)
132 krb5_lock_file(context, fd, mode)
134 int fd;
/illumos-gate/usr/src/lib/libbc/libc/stdio/4.2/
H A Dfopen.c57 int plus, oflag, fd; local
75 if ((fd = open(file, oflag, 0666)) < 0)
78 iop->_file = fd;
81 if ((lseek(fd,0L,2)) < 0) {
82 (void) close(fd);
/illumos-gate/usr/src/lib/libbc/libc/stdio/sys5/
H A Dfopen.c51 int plus, oflag, fd; local
69 if ((fd = open(file, oflag, 0666)) < 0)
72 iop->_file = fd;
78 if ((lseek(fd,0L,2)) < 0) {
79 (void) close(fd);
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dmkstemp.c66 int fd; local
96 if ((fd = open64(as, O_CREAT|O_EXCL|O_RDWR|flags,
98 return (fd);
101 if ((fd = open(as, O_CREAT|O_EXCL|O_RDWR|flags,
103 return (fd);
/illumos-gate/usr/src/lib/libcmd/common/
H A Dpids.c62 int fd; local
73 for (fd = 0; fd < 3; fd++)
74 if ((tid = tcgetpgrp(fd)) >= 0)

Completed in 363 milliseconds

<<11121314151617181920>>