/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_ctf_open.c | 59 int fd, ret; local 61 if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0644)) < 0) 64 if (ctf_write(fp, fd) == CTF_ERR) { 65 (void) close(fd); 69 ret = close(fd);
|
/illumos-gate/usr/src/lib/libbc/libc/sys/common/ |
H A D | _creat.c | 39 int fd; local 47 if ((fd = _syscall(SYS_openat, AT_FDCWD, 49 fd_add(fd, UTMPX_MAGIC_FLAG); 50 return (fd); 54 if ((fd = _syscall(SYS_openat, AT_FDCWD, 56 fd_add(fd, UTMPX_MAGIC_FLAG); 57 return (fd);
|
/illumos-gate/usr/src/lib/libc/port/stdio/ |
H A D | fdopen.c | 56 fdopen(int fd, const char *type) /* associate file desc. with stream */ argument 64 if (fcntl(fd, F_GETFD) == -1) 81 (void) lseek64(fd, (off64_t)0, SEEK_END); 94 iop->_file = fd; 96 if (fd <= _FILE_FD_MAX) { 97 SET_FILE(iop, fd); 98 } else if (_file_set(iop, fd, type) != 0) {
|
/illumos-gate/usr/src/test/zfs-tests/cmd/mmapwrite/ |
H A D | mmapwrite.c | 48 int fd = *(int *)fdp; local 51 mmap(0, 8192, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { 57 MAP_SHARED|MAP_FIXED, fd, 0) == MAP_FAILED) { 69 int fd; local 77 if ((fd = open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 0666)) == -1) { 82 if (pthread_create(NULL, NULL, mapper, &fd) != 0) { 87 if (write(fd, buf, sizeof (buf)) == -1) {
|
/illumos-gate/usr/src/lib/lvm/libmeta/common/ |
H A D | meta_devstamp.c | 43 int fd; local 52 if ((fd = open(np->rname, O_RDONLY | O_NDELAY, 0)) < 0) 56 if (meta_getvtoc(fd, np->cname, &vtocbuf, &partno, ep) == -1) { 57 (void) close(fd); 62 (void) close(fd); /* sd/ssd bug */ 82 int fd; local 92 if ((fd = open(np->rname, O_RDWR | O_NDELAY, 0)) < 0) 95 if (meta_getvtoc(fd, np->cname, &vtocbuf, &partno, ep) == -1) { 96 (void) close(fd); 105 if (meta_setvtoc(fd, n [all...] |
/illumos-gate/usr/src/lib/libast/common/port/ |
H A D | astwinsize.c | 72 astwinsize(int fd, register int* rows, register int* cols) argument 78 if (!ttctl(fd, TIOCGWINSZ, &ws) && ws.ws_col > 0 && ws.ws_row > 0) 89 if (!ttctl(fd, TIOCGSIZE, &ts) && ts.ts_lines > 0 && ts.ts_cols > 0) 100 if (!ttctl(fd, JWINSIZE, &ws) && ws.bytesx > 0 && ws.bytesy > 0) 124 ttctl(register int fd, int op, void* tt) argument 128 if (fd < 0) 130 for (fd = 0; fd <= 2; fd++) 131 if (!ioctl(fd, o [all...] |
/illumos-gate/usr/src/lib/libcontract/common/ |
H A D | libcontract_priv.c | 52 close_on_exec(int fd) argument 54 int flags = fcntl(fd, F_GETFD, 0); 55 if ((flags != -1) && (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) != -1)) 87 int n, fd; local 100 fd = open64(path, oflag); 101 if (fd != -1) { 102 if (close_on_exec(fd) == -1) { 104 (void) close(fd); 109 return (fd); 115 int fd, er local 130 int fd; local [all...] |
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/ |
H A D | notify.c | 101 int fd; local 121 if ((fd = open_locked(file, "w", MODE_NOREAD)) >= 0) { 122 fdprintf(fd, N_Msg[0], prs->secure->req_id, prs->secure->req_id, 131 fdprintf(fd, "\nThe job title was:\t%s\n", file); 132 fdprintf(fd, " submitted by:\t%s\n", 134 fdprintf(fd, " at:\t%s\n", 139 fdprintf(fd, N_Msg[1], prs->printer->printer->name); 142 fdprintf(fd, N_Msg[2], 149 fdprintf(fd, N_Msg[3]); 151 fdprintf(fd, N_Ms 188 print_reason(int fd, int reason) argument [all...] |
/illumos-gate/usr/src/cmd/cdrw/ |
H A D | mmc.h | 128 int test_unit_ready(int fd); 129 int inquiry(int fd, uchar_t *inq); 130 int read_capacity(int fd, uchar_t *capbuf); 131 int read_track_info(int fd, int trackno, uchar_t *ti); 132 int mode_sense(int fd, uchar_t pc, int dbd, int page_len, uchar_t *buffer); 133 int mode_select(int fd, int page_len, uchar_t *buffer); 134 int read_toc(int fd, int format, int trackno, int buflen, uchar_t *buf); 135 int read_disc_info(int fd, uchar_t *di); 136 int get_configuration(int fd, uint16_t feature, int bufsize, uchar_t *buf); 137 int read10(int fd, uint32_ [all...] |
/illumos-gate/usr/src/lib/libipmp/common/ |
H A D | ipmp_mpathd.c | 54 int fd; local 60 fd = socket(AF_INET, SOCK_STREAM, 0); 61 if (fd == -1) 71 (void) setsockopt(fd, IPPROTO_TCP, TCP_ANONPRIVBIND, &on, sizeof (on)); 81 if (bind(fd, (struct sockaddr *)&sin, sizeof (sin)) == -1) 90 if (connect(fd, (struct sockaddr *)&sin, sizeof (sin)) == -1) { 92 (void) close(fd); 101 flags = fcntl(fd, F_GETFL, 0); 103 (void) fcntl(fd, F_SETFL, flags | O_NONBLOCK); 105 *fdp = fd; 121 ipmp_readtlv(int fd, ipmp_infotype_t *typep, size_t *lenp, void **valuep, const struct timeval *endtp) argument 162 ipmp_write(int fd, const void *buffer, size_t buflen) argument 187 ipmp_writetlv(int fd, ipmp_infotype_t type, size_t len, void *value) argument 208 ipmp_read(int fd, void *buffer, size_t buflen, const struct timeval *endtp) argument [all...] |
/illumos-gate/usr/src/lib/libbc/libc/gen/common/ |
H A D | posix_tty.c | 106 tcgetattr(int fd, struct termios *termios_p) argument 108 return (ioctl(fd, TCGETS, termios_p)); 115 tcsetattr(int fd, int option, struct termios *termios_p) argument 130 return (ioctl(fd, TCSETSW, termios_p)); 132 return (ioctl(fd, TCSETSF, termios_p)); 134 return (ioctl(fd, TCSETS, termios_p)); 148 tcsendbreak(int fd, int duration) argument 153 if (ioctl(fd, TCSBRK, 0) == -1) 160 * wait for all output to drain from fd 163 tcdrain(int fd) argument 172 tcflow(int fd, int action) argument 191 tcflush(int fd, int queue) argument 209 tcgetpgrp(int fd) argument 223 tcsetpgrp(int fd, int grp_id) argument [all...] |
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/ |
H A D | contracts.c | 51 * Returns -1 on error, else the fd of the created template. 56 int fd; local 59 if ((fd = open(CONTRACT_TEMPLATE_PATH, O_RDWR)) == -1) { 73 if (((err = ct_pr_tmpl_set_param(fd, 75 ((err = ct_pr_tmpl_set_fatal(fd, CT_PR_EV_HWERR)) != 0) || 76 ((err = ct_tmpl_set_critical(fd, 0)) != 0) || 77 ((err = ct_tmpl_set_informative(fd, 0)) != 0)) { 81 (void) close(fd); 85 return (fd); 169 /* Returns -1 on error (with errno set), else fd 183 int fd; local 223 int fd; local [all...] |
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | attropen.c | 53 int fd; local 60 if ((fd = open64(file, O_RDONLY|O_NONBLOCK)) == -1) { 65 if ((attrfd = openat64(fd, attr, oflag | O_XATTR, 68 (void) close(fd); 74 (void) close(fd); 84 int fd; local 91 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) { 96 if ((attrfd = openat(fd, attr, oflag | O_XATTR, 99 (void) close(fd); 105 (void) close(fd); [all...] |
/illumos-gate/usr/src/lib/libast/common/comp/ |
H A D | symlink.c | 46 int fd; 48 if ((fd = open(b, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0) 51 n = (write(fd, FAKELINK_MAGIC, sizeof(FAKELINK_MAGIC)) != sizeof(FAKELINK_MAGIC) || write(fd, a, n) != n) ? -1 : 0; 52 close(fd);
|
/illumos-gate/usr/src/uts/intel/sys/ |
H A D | bootvfs.h | 54 int (*fsw_close)(int fd); 55 ssize_t (*fsw_read)(int fd, caddr_t buf, size_t size); 59 int (*fsw_getdents)(int fd, struct dirent *buf, unsigned size); 85 #define BRD_CLOSE(ops, fd) ((ops)->fsw_close)(fd) 86 #define BRD_READ(ops, fd, buf, s) ((ops)->fsw_read)(fd, buf, s) 87 #define BRD_SEEK(ops, fd, addr, w) ((ops)->fsw_lseek)(fd, addr, w) 88 #define BRD_FSTAT(ops, fd, st [all...] |
/illumos-gate/usr/src/tools/btxld/ |
H A D | version.c | 48 int fd; local 59 fd = open(file, O_RDONLY); 60 if (fd == -1) { 64 if (fstat(fd, &sb) == -1) { 66 close(fd); 77 close(fd); 85 ret = read(fd, buf, sb.st_size); 89 close(fd); 92 close(fd); 117 fd [all...] |
/illumos-gate/usr/src/cmd/lp/lib/requests/ |
H A D | putrequest.c | 67 int fd; local 119 if ((fd = open_locked(path, "w", MODE_NOREAD)) < 0) { 130 (void)fdprintf(fd, "%s%d\n", HEAD, reqbufp->copies); 134 (void)fdprintf(fd, "%s%s\n", HEAD, reqbufp->destination); 139 (void)fdprintf(fd, "%s%s\n", HEAD, *pp); 144 (void)fdprintf(fd, "%s%s\n", HEAD, reqbufp->form); 149 (void)fdprintf(fd, "%s%s\n", HEAD, NAME_IMMEDIATE); 151 (void)fdprintf(fd, "%s%s\n", HEAD, NAME_RESUME); 153 (void)fdprintf(fd, "%s%s\n", HEAD, NAME_HOLD); 158 (void)fdprintf(fd, " [all...] |
/illumos-gate/usr/src/lib/print/libipp-core/common/ |
H A D | write.c | 117 ipp_write_attribute(ipp_writer_t iwrite, void *fd, papi_attribute_t *attribute) argument 139 if (iwrite(fd, &type, 1) != 1) 145 if (iwrite(fd, &length, 2) != 2) 147 if (iwrite(fd, name, strlen(name)) != strlen(name)) 152 if (iwrite(fd, &length, 2) != 2) 164 if (iwrite(fd, &type, 1) != 1) 170 if (iwrite(fd, &length, 2) != 2) 172 if (iwrite(fd, name, strlen(name)) != strlen(name)) 178 if (iwrite(fd, &length, 2) != 2) 199 if (iwrite(fd, 319 ipp_write_attribute_group(ipp_writer_t iwrite, void *fd, int8_t type, papi_attribute_t **attributes) argument 337 ipp_write_attribute_groups(ipp_writer_t iwrite, void *fd, papi_attribute_t **groups) argument 367 ipp_write_message_header(ipp_writer_t iwrite, void *fd, papi_attribute_t **message) argument 403 ipp_write_message(ipp_writer_t iwrite, void *fd, papi_attribute_t **message) argument [all...] |
/illumos-gate/usr/src/cmd/sgs/libelf/misc/ |
H A D | nlist.c | 52 end_elf_job(int fd, Elf * elfdes) argument 55 (void) close(fd); 61 _elf_nlist(int fd, struct nlist * list) argument 74 (void) close(fd); 77 elfdes = elf_begin(fd, ELF_C_READ, (Elf *)0); 79 return (end_elf_job(fd, elfdes)); 83 return (end_elf_job(fd, elfdes)); 88 return (end_elf_job(fd, elfdes)); 118 (void) close(fd); 130 int fd; local [all...] |
/illumos-gate/usr/src/lib/libbc/libc/stdio/common/ |
H A D | fdopen.c | 47 fdopen(fd, mode) 48 int fd; 57 if(fd < 0 || fd >= nofile) { 66 iop->_file = fd; 75 (void) lseek(fd, 0L, 2);
|
/illumos-gate/usr/src/lib/libbc/libc/sys/sys5/ |
H A D | readv.c | 43 readv(int fd, struct iovec *iov, int iovcnt) argument 45 return (bc_readv(fd, iov, iovcnt)); 49 bc_readv(int fd, struct iovec *iov, int iovcnt) argument 55 if (fd_get(fd) != -1) { 66 if ((ret = _read(fd, nbuf, size)) == -1) { 82 return (_readv(fd, iov, iovcnt));
|
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | write_msg.c | 37 int fd = *( (int *) fdp); local 40 if (krb5_net_write(context, fd, (char *)&len, 4) < 0) { 43 if (outbuf->length && (krb5_net_write(context, fd, outbuf->data, outbuf->length) < 0)) {
|
/illumos-gate/usr/src/lib/libresolv2/common/bsd/ |
H A D | readv.c | 19 __readv(fd, vp, vpcount) 20 int fd; 27 int bytes = read(fd, vp->iov_base, vp->iov_len);
|
/illumos-gate/usr/src/cmd/format/ |
H A D | auto_sense.h | 42 int fd, 47 int fd, 56 struct disk_type *auto_direct_get_geom_label(int fd, struct dk_label *label);
|
/illumos-gate/usr/src/cmd/audio/include/ |
H A D | AudioUnixfile_inline.h | 41 return (fd); 49 fd = newfd; 53 // Return TRUE if fd is valid 57 return (fd >= 0);
|