Home
last modified time | relevance | path

Searched refs:sfd (Results 1 – 21 of 21) sorted by relevance

/titanic_44/usr/src/lib/libshell/common/features/
H A Dpoll26 int sfd[2];
32 socketpair(AF_UNIX, SOCK_STREAM, 0, sfd) < 0 ||
33 shutdown(sfd[1], SHUT_RD) < 0 ||
34 shutdown(sfd[0], SHUT_WR) < 0)
41 close(sfd[1]);
44 sfpkrd(sfd[0], buf, sizeof(buf), '\n', -1, 1) < 0)
50 close(sfd[0]);
52 write(sfd[1], msg, sizeof(msg) - 1);
56 close(sfd[0]);
58 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sfd) < 0 ||
[all …]
/titanic_44/usr/src/lib/libstmfproxy/common/
H A Dstmftransport.c77 int sfd, new_sfd; in pt_socket_connect() local
84 if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) <= 0) { in pt_socket_connect()
92 if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &on, in pt_socket_connect()
105 if (bind(sfd, (struct sockaddr *)&serv_addr, in pt_socket_connect()
112 (void) listen(sfd, 5); in pt_socket_connect()
114 new_sfd = accept(sfd, (struct sockaddr *)&cli_addr, &cliLen); in pt_socket_connect()
124 close(sfd); in pt_socket_connect()
139 (void) close(sfd); in pt_socket_connect()
145 (void) close(sfd); in pt_socket_connect()
152 while (connect(sfd, (struct sockaddr *)&sin, in pt_socket_connect()
[all …]
/titanic_44/usr/src/cmd/ipf/lib/common/
H A Dipft_sn.c47 static int sfd = -1, s_type = -1; variable
60 if (sfd != -1)
61 return sfd;
80 sfd = fd;
90 return close(sfd); in snoop_close()
103 if (read(sfd, (char *)rec, sizeof(*rec)) != sizeof(*rec))
141 if (read(sfd, bufp, i) != i)
174 if (read(sfd, s, i) != i)
/titanic_44/usr/src/cmd/filesync/
H A Drecon.c666 { int sfd, dfd; in samecompare() local
672 sfd = open(srcname, 0); in samecompare()
673 if (sfd < 0) in samecompare()
678 close(sfd); in samecompare()
683 count = read(sfd, srcbuf, COPY_BSIZE); in samecompare()
685 count = read(sfd, srcbuf, COPY_BSIZE)) { in samecompare()
706 close(sfd); in samecompare()
/titanic_44/usr/src/lib/udapl/udapl_tavor/tavor/
H A Ddapl_tavor_hca.c313 int sfd, retval, af; in dapli_process_ia() local
331 sfd = socket(af, SOCK_DGRAM, 0); in dapli_process_ia()
332 if (sfd < 0) { in dapli_process_ia()
340 (void) close(sfd); in dapli_process_ia()
348 retval = ioctl(sfd, SIOCGLIFADDR, (caddr_t)&lifreq); in dapli_process_ia()
350 (void) close(sfd); in dapli_process_ia()
368 (void) close(sfd); in dapli_process_ia()
/titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/
H A Dipsecalgs.c246 int sfd = socket(PF_POLICY, SOCK_RAW, PF_POLICY_V1); in kernel_synch() local
252 if (sfd < 0) { in kernel_synch()
295 cnt = write(sfd, sync_req_buf, req_len); in kernel_synch()
305 cnt = read(sfd, sync_req_buf, req_len); in kernel_synch()
326 (void) close(sfd); in kernel_synch()
332 int sfd = socket(PF_POLICY, SOCK_RAW, PF_POLICY_V1); in list_kernel_algs() local
345 if (sfd < 0) { in list_kernel_algs()
354 cnt = write(sfd, &msg, sizeof (msg)); in list_kernel_algs()
364 cnt = read(sfd, reply_buf, sizeof (reply_buf)); in list_kernel_algs()
375 (void) close(sfd); in list_kernel_algs()
H A Dipsecconf.c598 int sfd; in fetch_algorithms() local
610 sfd = get_pf_pol_socket(); in fetch_algorithms()
611 if (sfd < 0) { in fetch_algorithms()
620 cnt = write(sfd, &msg, sizeof (msg)); in fetch_algorithms()
629 cnt = read(sfd, reply_buf, sizeof (reply_buf)); in fetch_algorithms()
641 (void) close(sfd); in fetch_algorithms()
708 (void) close(sfd); in fetch_algorithms()
2615 int sfd; in pfp_delete_rule() local
2618 sfd = get_pf_pol_socket(); in pfp_delete_rule()
2619 if (sfd < 0) { in pfp_delete_rule()
[all …]
/titanic_44/usr/src/cmd/ipf/tools/
H A Dipfs.c461 int sfd = -1, i; local
467 sfd = open(file, O_RDONLY, 0600);
468 if (sfd == -1) {
480 i = read(sfd, &ips, sizeof(ips));
483 close(sfd);
491 close(sfd);
529 close(sfd);
/titanic_44/usr/src/cmd/svc/startd/
H A Dfork.c530 int efd, sfd; in fork_configd_thread() local
552 sfd = contract_open(ctid, "process", "status", O_RDONLY); in fork_configd_thread()
553 if (sfd < 0) { in fork_configd_thread()
558 if (err = ct_status_read(sfd, CTD_COMMON, &status)) { in fork_configd_thread()
563 startd_close(sfd); in fork_configd_thread()
571 startd_close(sfd); in fork_configd_thread()
H A Drestarter.c2228 int efd, sfd; in restarter_contracts_event_thread() local
2249 if ((sfd = contract_open(ctid, "process", "status", O_RDONLY)) in restarter_contracts_event_thread()
2255 if (err = ct_status_read(sfd, CTD_COMMON, &status)) { in restarter_contracts_event_thread()
2259 startd_close(sfd); in restarter_contracts_event_thread()
2271 startd_close(sfd); in restarter_contracts_event_thread()
/titanic_44/usr/src/lib/libcmdutils/common/
H A Dprocess_xattrs.c36 get_attrdirs(int indfd, int outdfd, char *attrfile, int *sfd, int *tfd) in get_attrdirs() argument
49 *sfd = fd1; in get_attrdirs()
/titanic_44/usr/src/lib/libdiskmgt/common/
H A Dslice.c531 int sfd; in get_attrs() local
534 if ((sfd = open(sp->devpath, O_RDONLY|O_NDELAY)) >= 0) { in get_attrs()
535 if (ioctl(sfd, DKIOCINFO, &dkinfo) >= 0) { in get_attrs()
538 (void) close(sfd); in get_attrs()
/titanic_44/usr/src/cmd/truss/
H A Dramdata.c47 int sfd; /* shared tmp file descriptor */ variable
H A Dmain.c594 sfd = open(tmps, O_CREAT|O_APPEND|O_EXCL|O_RDWR, 0600); in main()
595 if (sfd == -1) in main()
1670 if (write(sfd, buf, sizeof (fentry) + i + j) == -1) in child_to_file()
1688 if (write(sfd, buf, bufsz) == -1) in child_to_file()
1718 if (fstat(sfd, &fsi) == -1) in file_to_parent()
1724 if (pread(sfd, &ntry, sizeof (hdntry_t), c_offset) != in file_to_parent()
1741 if (pread(sfd, t, ntry.sz_lib, c_offset) != ntry.sz_lib) in file_to_parent()
1753 if (pread(sfd, s, ntry.sz_key, c_offset) != ntry.sz_key) in file_to_parent()
1774 if (pread(sfd, ncp, ntry.sz_key, c_offset) != in file_to_parent()
1833 if (fstat(sfd, &fsi) == -1) in file_to_parent()
H A Dramdata.h131 extern int sfd; /* file descriptor to shared tmp file */
/titanic_44/usr/src/cmd/sysdef/
H A Dsysdef.c542 int sfd; in modules() local
644 if ((sfd = open(sorted_fname, O_RDWR|O_CREAT|O_EXCL, in modules()
705 if ((fp = fdopen(sfd, "r")) == NULL) { in modules()
/titanic_44/usr/src/cmd/tip/
H A Dtip.h248 int sfd; /* for ~< operation */ variable
H A Dcmds.c66 if ((sfd = creat(cp, 0666)) < 0) { in getfl()
78 transfer(buf, sfd, value(EOFREAD)); in getfl()
/titanic_44/usr/src/cmd/cmd-inet/usr.bin/pppd/
H A Dsys-solaris.c3063 int sfd; local
3092 sfd = open(pty_name, O_RDWR);
3093 if (sfd < 0) {
3098 if (myioctl(sfd, I_PUSH, "ptem") < 0) {
3101 dbglog("Using %s; master fd %d, slave fd %d", pty_name, mfd, sfd);
3106 *slave_fdp = sfd;
/titanic_44/usr/src/cmd/fs.d/pcfs/mkfs/
H A Dmkfs.c159 int dfd, int sfd, int remaining);
2934 write_rest(bpb_t *wbpb, char *efn, int dfd, int sfd, int remaining) in write_rest() argument
2951 if ((rstat = read(sfd, buf, BPSEC)) < 0) { in write_rest()
/titanic_44/usr/src/cmd/sendmail/src/
H A Dmap.c4400 SM_FILE_T *sfd; local
4424 sfd = safefopen(ldapmap_dequote(lmap->ldap_secret),
4426 if (sfd == NULL)
4433 sfd, TimeOuts.to_fileopen,
4435 (void) sm_io_close(sfd, SM_TIME_DEFAULT);