/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | promptusr.c | 48 int fd; local 54 fd=fileno(stdin); 56 if (tcgetattr(fd, &echo_control) == -1) 78 if (tcsetattr(fd, TCSANOW, &echo_control) == -1) 104 if (tcsetattr(fd, TCSANOW, &save_control) == -1) { 124 tcsetattr(fd, TCSANOW, &save_control);
|
/illumos-gate/usr/src/lib/libresolv2/common/nameser/ |
H A D | ns_newmsg.c | 112 struct _ns_flagdata *fd = &_ns_flagdata[flag]; local 116 msg->_flags &= (~fd->mask); 117 msg->_flags |= (value << fd->shift);
|
/illumos-gate/usr/src/lib/librsm/inc/ |
H A D | rsmlib_in.h | 61 /* least significant 3 bytes of the fd should be unique enough */ 62 #define RSM_POLLFD_HASH(fd) (((fd) ^ ((fd) >> 8) ^ ((fd) >> 16)) % \ 66 * pollfd_table maintains a mapping from fd to resource number. It also 67 * provides a mechanism to check if a given fd corresponds to an rsmapi 72 int fd; member in struct:__anon3901
|
/illumos-gate/usr/src/lib/libsaveargs/tests/dump/ |
H A D | dump.c | 139 int errp, fd; local 154 if ((fd = open(argv[1], O_RDONLY)) == -1) 157 if ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) 164 (void) close(fd);
|
/illumos-gate/usr/src/lib/libshell/common/bltins/ |
H A D | hist.c | 36 static void hist_subst(const char*, int fd, char*); 286 static void hist_subst(const char *command,int fd,char *replace) argument 294 if((size = lseek(fd,(off_t)0,SEEK_END)) < 0) 296 lseek(fd,(off_t)0,SEEK_SET); 299 if(read(fd,string,c)!=c)
|
H A D | poll_solaris.c | 49 "poll examines the given file descriptor in the subscript \b.fd\b " 59 "[+?\b.fd\b # file descriptor]" 101 "[+POLLNVAL?The specified fd value does not belong to an " 108 "[+?If the value fd is less than 0, events is ignored and " 246 int fd; local 324 np = nv_open_fmt(shp->var_tree, NV_NOFAIL|NV_NOADD, "%s[%s].fd", varname, subname); 326 errormsg(SH_DICT, ERROR_system(1), "missing pollfd %s[%s].fd", varname, subname); 327 fd = (int)nv_getnum(np); 328 if (fd < 0 || fd > OPEN_MA [all...] |
H A D | sleep.c | 168 struct pollfd fd; local 179 poll(&fd,0,n);
|
/illumos-gate/usr/src/lib/libsmbfs/smb/ |
H A D | connect.c | 81 smb_setopt_int(int fd, int level, int name, int val) argument 104 if (t_optmgmt(fd, &oreq, &ores) < 0) { 120 smb_setopts(int fd) argument 133 err = smb_setopt_int(fd, SOL_SOCKET, SO_SNDBUF, smb_tcpsndbuf); 138 err = smb_setopt_int(fd, SOL_SOCKET, SO_RCVBUF, smb_tcprcvbuf); 143 err = smb_setopt_int(fd, SOL_SOCKET, SO_KEEPALIVE, 1); 148 err = smb_setopt_int(fd, IPPROTO_TCP, TCP_NODELAY, 1); 154 err = smb_setopt_int(fd, IPPROTO_TCP, 171 int fd, err; local 184 fd 232 int fd, err; local [all...] |
H A D | file.c | 66 smb_fh_close(int fd) argument 68 return (close(fd)); 137 int fd = -1; local 198 fd = smb_fh_ntcreate(ctx, ntpath, 203 return (fd); 207 smb_fh_read(int fd, off_t offset, size_t count, argument 217 if (ioctl(fd, SMBIOC_READ, &rwrq) == -1) { 224 smb_fh_write(int fd, off_t offset, size_t count, argument 234 if (ioctl(fd, SMBIOC_WRITE, &rwrq) == -1) { 249 smb_fh_xactnp(int fd, argument [all...] |
H A D | nb_ssn.c | 150 int fd = ctx->ct_tran_fd; local 162 cnt = t_rcv(fd, &hdrbuf, sizeof (hdrbuf), &moreflag); 164 err = get_xti_err(fd); 200 cnt = t_rcv(fd, buf, len, &moreflag); 202 err = get_xti_err(fd); 216 get_xti_err(int fd) argument 223 look = t_look(fd); 226 (void) t_rcvdis(fd, NULL); 227 (void) t_snddis(fd, NULL); 231 (void) t_rcvrel(fd); [all...] |
/illumos-gate/usr/src/lib/libsmbios/common/ |
H A D | smb_lib.c | 52 smb_fileopen(int fd, int version, int flags, int *errp) argument 59 if ((n = pread64(fd, ep, sizeof (*ep), 0)) != sizeof (*ep)) 67 if ((n = pread64(fd, ep, elen, 0)) != elen) 73 if ((n = pread64(fd, stbuf, ep->smbe_stlen, 90 smb_biosopen(int fd, int version, int flags, int *errp) argument 98 PROT_READ, MAP_SHARED, fd, (uint32_t)SMB_RANGE_START); 125 PROT_READ, MAP_SHARED, fd, ep->smbe_staddr & pgmask); 148 smbios_fdopen(int fd, int version, int flags, int *errp) argument 152 if (stat64(SMB_BIOS_DEVICE, &st1) == 0 && fstat64(fd, &st2) == 0 && 154 return (smb_biosopen(fd, versio 163 int fd; local 178 smbios_xwrite(smbios_hdl_t *shp, int fd, const void *buf, size_t buflen) argument 194 smbios_write(smbios_hdl_t *shp, int fd) argument [all...] |
/illumos-gate/usr/src/lib/libsmedia/library/common/ |
H A D | l_generic.c | 45 extern smedia_handle_t get_handle(int fd); 47 extern smedia_handle_t get_handle_from_fd(int32_t fd); 205 smedia_get_handle(int32_t fd) argument 207 return (get_handle_from_fd(fd));
|
H A D | l_misc.c | 200 get_dev_library_handle(int32_t fd) argument 212 if (ioctl(fd, DKIOCINFO, &dkinfo) == -1) { 339 get_handle_from_fd(int32_t fd) argument 366 if (ioctl(fd, DKIOCINFO, &handle->sm_dkinfo) == -1) { 371 lib_handle = get_dev_library_handle(fd); 382 DPRINTF2("fd=%d signature=0x%x\n", handle->sm_fd, handle->sm_signature); 406 ddesc[0].d_data.d_desc.d_descriptor = fd; 481 handle->sm_fd = fd; 489 handle->sm_fd = fd;
|
/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/lib/libdhcpagent/common/ |
H A D | dhcp_hostconf.c | 102 int fd; local 109 fd = open(ifname_to_hostconf(ifname, isv6), O_RDONLY); 110 if (fd == -1) 113 if (read(fd, &magic, sizeof (magic)) != sizeof (magic)) 119 if (read(fd, &orig_time, sizeof (orig_time)) != sizeof (orig_time)) 136 retval = read(fd, &plp->len, sizeof (plp->len)); 152 if (read(fd, pkt, plp->len) != plp->len) 295 (void) close(fd); 305 (void) close(fd); 330 int fd; local [all...] |
H A D | dhcp_stable.c | 65 int fd; local 70 if ((fd = open(DUID_FILE, O_RDONLY)) == -1) 72 if (fstat(fd, &sb) != -1 && S_ISREG(sb.st_mode) && 74 retv = read(fd, duid, sb.st_size); 88 (void) close(fd); 103 int fd; local 107 if ((fd = open(DUID_FILE, O_WRONLY | O_CREAT, 0644)) == -1) 109 retv = write(fd, duid, duidlen); 111 return (close(fd)); 113 (void) close(fd); 195 int fd; local 220 int fd; local 263 int fd; local [all...] |
/illumos-gate/usr/src/lib/libdiskmgt/common/ |
H A D | inuse_lu.c | 68 static int lustatus(int fd); 69 static int lufslist(int fd); 70 static int run_cmd(char *path, char *cmd, char *arg, int fd); 174 int fd; local 178 if ((fd = mkstemp(tmpname)) != -1) { 180 if (run_cmd("/usr/sbin/lustatus", "lustatus", NULL, fd)) { 181 status = lustatus(fd); 183 (void) close(fd); 195 lufslist(int fd) argument 201 if ((fp = fdopen(fd, " 253 lustatus(int fd) argument 308 run_cmd(char *path, char *cmd, char *arg, int fd) argument [all...] |
/illumos-gate/usr/src/lib/libsqlite/src/ |
H A D | test2.c | 497 OsFile fd; local 505 rc = sqliteOsOpenReadWrite(argv[2], &fd, &readOnly); 512 rc = sqliteOsSeek(&fd, offset); 517 rc = sqliteOsWrite(&fd, "Hello, World!", 14); 518 sqliteOsClose(&fd);
|
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/ |
H A D | newterm.c | 456 typeahead(int fd) argument 459 if (fd != -1) { 460 if (isatty(fd)) { 461 __m_screen->_kfd = fd;
|
/illumos-gate/usr/src/lib/libzonecfg/common/ |
H A D | scratchops.c | 70 lock_op(int fd, int type) argument 79 return (fcntl(fd, F_SETLKW, &lock)); 87 int fd, flags; local 97 if ((fd = open(mapfile, flags, 0644)) == -1) { 109 fd = open(mapfile, O_RDWR); 110 if (fd == -1) 112 if (fstat(fd, &fbuf) == -1) 119 if (lock_op(fd, F_RDLCK) == -1) 122 if ((fp = fdopen(fd, "r+")) == NULL) 123 (void) close(fd); [all...] |
/illumos-gate/usr/src/lib/libnsctl/common/ |
H A D | cache.c | 60 nsc_fd_t *fd; local 67 if (!(fd = (nsc_fd_t *)calloc(1, sizeof (nsc_fd_t)))) 75 fd->sf_flag = flag; 76 fd->sf_fmode = mode; 78 strcpy(fd->sf_path, path); 80 if (!_nsc_open_path(fd)) { 81 free(fd); 85 if (ckdchk && !_nsc_open_check(fd)) { 86 (void) nsc_close(fd); 90 return (fd); 100 nsc_fd_t *fd; local 268 nsc_partsize(nsc_fd_t *fd, nsc_size_t *rvp) argument 306 int fd, rc, save_errno; local [all...] |
H A D | machdep.c | 57 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/libnsl/rpc/ |
H A D | pmap_clnt.c | 132 int fd = RPC_ANYFD; local 138 &fd, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); 166 int fd = RPC_ANYFD; local 173 client = clnttcp_create(address, PMAPPROG, PMAPVERS, &fd, 50, 500); 199 int fd = RPC_ANYFD; local 207 client = clntudp_create(addr, PMAPPROG, PMAPVERS, rmttimeout, &fd);
|
H A D | svc_generic.c | 213 svc_tli_create(const int fd, const struct netconfig *nconf, argument 216 return (svc_tli_create_common(fd, nconf, bindaddr, sendsz, recvsz, 0)); 220 * If fd is RPC_ANYFD, then it opens a fd for the given transport 236 bool_t madefd = FALSE; /* whether fd opened here */ 238 int fd = ofd; local 240 if (fd == RPC_ANYFD) { 246 fd = t_open(nconf->nc_device, O_RDWR, &tinfo); 247 if (fd == -1) { 262 if ((state = t_sync(fd)) [all...] |
/illumos-gate/usr/src/lib/libnsl/saf/ |
H A D | doconfig.c | 65 * args: fd - file descriptor to push and pop from 72 doconfig(int fd, char *script, long rflag) argument 131 if (dopush(fd, p)) { 136 if (dopop(fd, p)) { 263 * args: fd - file descriptor to push on 269 dopush(int fd, char *p) argument 289 if (ioctl(fd, I_PUSH, p) < 0) { 297 (void) ioctl(fd, I_POP, 0); 310 * args: fd - file descriptor to pop from 316 dopop(int fd, cha argument [all...] |