Home
last modified time | relevance | path

Searched refs:newfd (Results 1 – 25 of 30) sorted by relevance

12

/titanic_41/usr/src/lib/libast/common/sfio/
H A Dsfsetfd.c30 static int _sfdup(int fd, int newfd) in _sfdup() argument
32 static int _sfdup(fd,newfd) in _sfdup()
34 int newfd;
40 while((dupfd = sysfcntlf(fd,F_DUPFD,newfd)) < 0 && errno == EINTR)
45 if((dupfd = sysdupf(fd)) < 0 || dupfd >= newfd)
49 newfd = _sfdup(fd,newfd);
54 return newfd;
59 int sfsetfd(Sfio_t* f, int newfd) in sfsetfd() argument
61 int sfsetfd(f,newfd) in sfsetfd()
63 int newfd;
[all …]
/titanic_41/usr/src/cmd/sgs/ar/common/
H A Dfile.c480 int newfd; in mksymtab() local
486 newfd = 0; in mksymtab()
527 if ((newfd = in mksymtab()
536 if ((elf = elf_begin(newfd, in mksymtab()
541 (void) close(newfd); in mksymtab()
542 newfd = 0; in mksymtab()
547 if (newfd) { in mksymtab()
548 (void) close(newfd); in mksymtab()
549 newfd = 0; in mksymtab()
577 if (newfd) { in mksymtab()
[all …]
/titanic_41/usr/src/lib/libc/port/sys/
H A Drename.c34 renameat(int oldfd, const char *oldname, int newfd, const char *newname) in renameat() argument
36 return (syscall(SYS_renameat, oldfd, oldname, newfd, newname)); in renameat()
/titanic_41/usr/src/cmd/audio/include/
H A DAudioUnixfile_inline.h47 int newfd) // new file descriptor in setfd() argument
49 fd = newfd; in setfd()
/titanic_41/usr/src/cmd/smbsrv/smbd/
H A Dsmbd_pipesvc.c179 int err, listen_fd, newfd, snlen; in pipesvc_listener() local
213 newfd = accept(listen_fd, (struct sockaddr *)&sa, &snlen); in pipesvc_listener()
214 if (newfd < 0) { in pipesvc_listener()
230 np = np_new(pl, newfd); in pipesvc_listener()
233 (void) close(newfd); in pipesvc_listener()
H A Dsmbd_share_doorsvc.c61 int newfd; in smbd_share_start() local
88 if ((newfd = creat(door_name, 0644)) < 0) { in smbd_share_start()
97 (void) close(newfd); in smbd_share_start()
/titanic_41/usr/src/cmd/picl/plugins/common/piclevent/
H A Dpiclevent.c196 int newfd; in setup_door() local
197 if ((newfd = creat(PICLEVENT_DOOR, 0444)) < 0) { in setup_door()
202 (void) close(newfd); in setup_door()
/titanic_41/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/
H A Dmpd_main.c86 static unsigned int process_cmd(int newfd, union mi_commands *mpi);
2270 int newfd; in loopback_cmd() local
2283 newfd = accept(sock, (struct sockaddr *)&peer, &peerlen); in loopback_cmd()
2284 if (newfd < 0) { in loopback_cmd()
2298 (void) close(newfd); in loopback_cmd()
2309 (void) close(newfd); in loopback_cmd()
2317 (void) close(newfd); in loopback_cmd()
2332 (void) close(newfd); in loopback_cmd()
2338 (void) close(newfd); in loopback_cmd()
2346 len = read(newfd, &mpi, sizeof (mpi)); in loopback_cmd()
[all …]
/titanic_41/usr/src/cmd/cvcd/sparc/sun4u/starfire/
H A Dcvcd.c584 int newfd; local
613 newfd = t_open(TCP_DEV, O_RDWR|O_NDELAY, NULL);
614 if (newfd == -1) {
620 if (t_accept(fd, newfd, tcall) < 0) {
623 t_close(newfd);
652 if (ioctl(newfd, TI_GETPEERNAME, &netbuf) < 0) {
655 t_close(newfd);
677 t_close(newfd);
681 pfd[0].fd = newfd;
/titanic_41/usr/src/cmd/modload/
H A Dplcysubr.c258 int newfd; in delete_one_entry() local
300 newfd = fileno(new); in delete_one_entry()
304 (void) fchown(newfd, buf.st_uid, buf.st_gid); in delete_one_entry()
305 (void) fchmod(newfd, buf.st_mode); in delete_one_entry()
307 (void) fchown(newfd, 0, 3); /* root:sys */ in delete_one_entry()
308 (void) fchmod(newfd, 0644); in delete_one_entry()
412 (void) fsync(newfd); in delete_one_entry()
H A Ddrvsubr.c357 int newfd; in delete_entry() local
415 if ((newfd = open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0644)) < 0) { in delete_entry()
427 if ((newfp = fdopen(newfd, "w")) == NULL) { in delete_entry()
431 (void) close(newfd); in delete_entry()
1411 int newfd; in update_minor_entry() local
1433 if ((newfd = open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0644)) < 0) { in update_minor_entry()
1445 if ((newfp = fdopen(newfd, "w")) == NULL) { in update_minor_entry()
1449 (void) close(newfd); in update_minor_entry()
/titanic_41/usr/src/stand/lib/sock/
H A Dsock_test.c711 int listen_fd, newfd; in st_echo() local
756 if ((newfd = st_local_accept(listen_fd, (struct sockaddr *)&addr, in st_echo()
768 (void) st_local_socket_close(newfd); in st_echo()
771 while ((ret = st_local_recv(newfd, buf, buf_len, 0)) > 0) { in st_echo()
774 if ((snd_cnt = st_local_send(newfd, buf, ret, 0)) < ret) { in st_echo()
781 (void) st_local_socket_close(newfd); in st_echo()
/titanic_41/usr/src/lib/libpkg/common/
H A Dkeystore.c1149 int newfd; in restore_keystore_file() local
1167 if ((newfd = open(newpath, O_RDWR|O_NONBLOCK, 0)) != -1) { in restore_keystore_file()
1168 if (fstat(newfd, &buf) != -1) { in restore_keystore_file()
1175 if (!wait_restore(newfd, keystore_file, in restore_keystore_file()
1180 (void) close(newfd); in restore_keystore_file()
1189 (void) close(newfd); in restore_keystore_file()
1197 (void) close(newfd); in restore_keystore_file()
1207 wait_restore(int newfd, char *keystore_file, in wait_restore() argument
1215 if (file_lock(newfd, F_WRLCK, 1) == -1) { in wait_restore()
1222 if (fstat(newfd, &buf) != -1) { in wait_restore()
[all …]
/titanic_41/usr/src/lib/auditd_plugins/binfile/
H A Dbinfile.c513 int newfd = 0; in open_log() local
527 newfd = open(newname, in open_log()
529 if (newfd < 0) { in open_log()
583 error = write_file_token(newfd, oldname); in open_log()
586 (void) close(newfd); in open_log()
599 current_dir->dl_fd = newfd; in open_log()
/titanic_41/usr/src/lib/abi/apptrace/common/
H A Dapptrace.c237 int fd, newfd, targetfd, lowerlimit; in la_version() local
280 if ((newfd = fcntl(fd, F_DUPFD, targetfd)) != -1) in la_version()
284 if (newfd == -1) { in la_version()
293 if (fcntl(newfd, F_SETFD, FD_CLOEXEC) == -1) { in la_version()
301 if ((fp = fdopen(newfd, "wF")) != NULL) { in la_version()
/titanic_41/usr/src/cmd/sendmail/aux/
H A Dmail.local.c534 int newfd; local
704 if ((newfd = dup(bfd)) >= 0) {
706 bfd = newfd;
708 if ((newfd = dup(hfd)) >= 0) {
710 hfd = newfd;
/titanic_41/usr/src/lib/libshell/common/sh/
H A Dio.c1505 register int fd, savefd, newfd; in sh_iounsave() local
1506 for(newfd=fd=0; fd < shp->topfd; fd++) in sh_iounsave()
1509 filemap[newfd++] = filemap[fd]; in sh_iounsave()
1516 shp->topfd = newfd; in sh_iounsave()
1952 int newfd = integralof(data); in sftrack() local
1955 if(newfd<0) in sftrack()
1958 (*fdnotify)(sffileno(sp),flag==SF_CLOSING?-1:newfd); in sftrack()
2014 else if(flag==SF_CLOSING || (flag==SF_SETFD && newfd<=2)) in sftrack()
2287 int newfd, arg; in sh_fcntl() local
2292 newfd = fcntl(fd,op,arg); in sh_fcntl()
[all …]
/titanic_41/usr/src/uts/common/avs/ns/rdc/
H A Drdc_bitmap.c1015 nsc_fd_t *newfd = NULL; in rdc_move_bitmap() local
1053 newfd = nsc_open(newbitmap, NSC_RDCHR_ID|NSC_FILE|NSC_RDWR, 0, 0, 0); in rdc_move_bitmap()
1054 if (newfd == NULL) { in rdc_move_bitmap()
1055 newfd = nsc_open(newbitmap, in rdc_move_bitmap()
1057 if (newfd == NULL) { in rdc_move_bitmap()
1066 sts = nsc_reserve(newfd, 0); in rdc_move_bitmap()
1072 sts = nsc_partsize(newfd, &vol_size); in rdc_move_bitmap()
1073 nsc_release(newfd); in rdc_move_bitmap()
1091 krdc->bitmapfd = newfd; /* swap under lock */ in rdc_move_bitmap()
1111 newfd = NULL; in rdc_move_bitmap()
[all …]
/titanic_41/usr/src/cmd/nscd/
H A Dnscd_frontend.c1184 int newfd; in _nscd_setup_server() local
1188 if ((newfd = creat(TSOL_NAME_SERVICE_DOOR, 0444)) < 0) { in _nscd_setup_server()
1199 (void) close(newfd); in _nscd_setup_server()
1212 int newfd; in _nscd_setup_server() local
1216 if ((newfd = creat(NAME_SERVICE_DOOR, 0444)) < 0) { in _nscd_setup_server()
1225 (void) close(newfd); in _nscd_setup_server()
/titanic_41/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/
H A Dmain.c2216 int newfd; in ndpd_cmd_handler() local
2223 newfd = accept(sock, (struct sockaddr *)&peer, &peerlen); in ndpd_cmd_handler()
2224 if (newfd < 0) { in ndpd_cmd_handler()
2229 retval = ipadm_ndpd_read(newfd, &ndpd_msg, sizeof (ndpd_msg)); in ndpd_cmd_handler()
2233 retval = ndpd_process_cmd(newfd, &ndpd_msg); in ndpd_cmd_handler()
2238 (void) close(newfd); in ndpd_cmd_handler()
2245 ndpd_process_cmd(int newfd, ipadm_ndpd_msg_t *msg) in ndpd_process_cmd() argument
2251 (void) ndpd_send_error(newfd, EPERM); in ndpd_process_cmd()
2278 (void) ndpd_send_error(newfd, err); in ndpd_process_cmd()
/titanic_41/usr/src/cmd/dcs/sparc/sun4u/
H A Ddcs.c196 int newfd; in main() local
376 newfd = rdr_connect_srv(dcs_rcv.fd); in main()
378 if ((newfd == RDR_ERROR) || (newfd == RDR_NET_ERR)) { in main()
385 if (ses_start(newfd) == -1) { in main()
387 (void) rdr_close(newfd); in main()
/titanic_41/usr/src/lib/libshell/common/edit/
H A Dhistory.c1159 register int newfd,oldfd; in hist_exceptf() local
1167 if((newfd=open(hp->histname,O_BINARY|O_APPEND|O_CREAT|O_RDWR,S_IRUSR|S_IWUSR)) >= 0) in hist_exceptf()
1169 if(fcntl(newfd, F_DUPFD, oldfd) !=oldfd) in hist_exceptf()
1172 close(newfd); in hist_exceptf()
/titanic_41/usr/src/cmd/picl/picld/
H A Dpicld.c1045 int newfd; in setup_door() local
1049 newfd = creat(PICLD_DOOR, 0444); in setup_door()
1052 if (newfd < 0) in setup_door()
1054 (void) close(newfd); in setup_door()
/titanic_41/usr/src/lib/brand/solaris10/s10_brand/common/
H A Ds10_deleted.c294 int oldfd, const char *oldname, int newfd, const char *newname) in s10_renameat() argument
297 oldfd, oldname, newfd, newname)); in s10_renameat()
/titanic_41/usr/src/lib/smbsrv/libmlsvc/common/
H A Dsmb_quota.c1124 int newfd, dirfd, afd; in smb_quota_add_ctrldir() local
1156 if ((newfd = creat(file, 0640)) < 0) { in smb_quota_add_ctrldir()
1160 (void) close(newfd); in smb_quota_add_ctrldir()

12