/illumos-gate/usr/src/contrib/ast/src/lib/libast/sfio/ |
H A D | sfsetfd.c | 30 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 …]
|
/illumos-gate/usr/src/boot/libsa/ |
H A D | nfs.c | 248 nfs_lookupfh(struct nfs_iodesc *d, const char *name, struct nfs_iodesc *newfd) in nfs_lookupfh() argument 304 newfd->fhsize = ntohl(repl->fhsize); in nfs_lookupfh() 305 bcopy(repl->fhplusattr, &newfd->fh, newfd->fhsize); in nfs_lookupfh() 306 pos = roundup(newfd->fhsize, sizeof (uint32_t)) / sizeof (uint32_t); in nfs_lookupfh() 311 bcopy(&repl->fhplusattr[pos], &newfd->fa, sizeof (newfd->fa)); in nfs_lookupfh() 471 struct nfs_iodesc *newfd = NULL; in nfs_open() local 523 currfd = malloc(sizeof (*newfd)); in nfs_open() 529 newfd = NULL; in nfs_open() 554 newfd = malloc(sizeof (*newfd)); in nfs_open() 555 if (newfd == NULL) { in nfs_open() [all …]
|
/illumos-gate/usr/src/cmd/sgs/ar/common/ |
H A D | file.c | 481 int newfd; in mksymtab() local 487 newfd = 0; in mksymtab() 528 if ((newfd = in mksymtab() 537 if ((elf = elf_begin(newfd, in mksymtab() 542 (void) close(newfd); in mksymtab() 543 newfd = 0; in mksymtab() 548 if (newfd) { in mksymtab() 549 (void) close(newfd); in mksymtab() 550 newfd = 0; in mksymtab() 578 if (newfd) { in mksymtab() [all …]
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | rename.c | 34 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()
|
/illumos-gate/usr/src/cmd/audio/include/ |
H A D | AudioUnixfile_inline.h | 45 int newfd) // new file descriptor in setfd() argument 47 fd = newfd; in setfd()
|
/illumos-gate/usr/src/cmd/picl/plugins/common/piclevent/ |
H A D | piclevent.c | 194 int newfd; in setup_door() local 195 if ((newfd = creat(PICLEVENT_DOOR, 0444)) < 0) { in setup_door() 200 (void) close(newfd); in setup_door()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/ |
H A D | mpd_main.c | 88 static unsigned int process_cmd(int newfd, union mi_commands *mpi); 2272 int newfd; in loopback_cmd() local 2285 newfd = accept(sock, (struct sockaddr *)&peer, &peerlen); in loopback_cmd() 2286 if (newfd < 0) { in loopback_cmd() 2300 (void) close(newfd); in loopback_cmd() 2311 (void) close(newfd); in loopback_cmd() 2319 (void) close(newfd); in loopback_cmd() 2334 (void) close(newfd); in loopback_cmd() 2341 (void) close(newfd); in loopback_cmd() 2349 len = read(newfd, &mpi, sizeof (mpi)); in loopback_cmd() [all …]
|
/illumos-gate/usr/src/cmd/smbsrv/smbd/ |
H A D | smbd_pipesvc.c | 182 int err, listen_fd, newfd, snlen; in pipesvc_listener() local 216 newfd = accept(listen_fd, (struct sockaddr *)&sa, &snlen); in pipesvc_listener() 217 if (newfd < 0) { in pipesvc_listener() 233 np = np_new(pl, newfd); in pipesvc_listener() 236 (void) close(newfd); in pipesvc_listener()
|
H A D | smbd_share_doorsvc.c | 64 int newfd; in smbd_share_start() local 91 if ((newfd = creat(door_name, 0644)) < 0) { in smbd_share_start() 100 (void) close(newfd); in smbd_share_start()
|
/illumos-gate/usr/src/cmd/modload/ |
H A D | plcysubr.c | 258 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 D | drvsubr.c | 369 int newfd; in delete_entry() local 427 if ((newfd = open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0644)) < 0) { in delete_entry() 439 if ((newfp = fdopen(newfd, "w")) == NULL) { in delete_entry() 443 (void) close(newfd); in delete_entry() 1431 int newfd; in update_minor_entry() local 1453 if ((newfd = open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0644)) < 0) { in update_minor_entry() 1465 if ((newfp = fdopen(newfd, "w")) == NULL) { in update_minor_entry() 1469 (void) close(newfd); in update_minor_entry()
|
/illumos-gate/usr/src/stand/lib/sock/ |
H A D | sock_test.c | 711 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()
|
/illumos-gate/usr/src/lib/auditd_plugins/binfile/ |
H A D | binfile.c | 513 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()
|
/illumos-gate/usr/src/lib/abi/apptrace/common/ |
H A D | apptrace.c | 235 int fd, newfd, targetfd, lowerlimit; in la_version() local 278 if ((newfd = fcntl(fd, F_DUPFD, targetfd)) != -1) in la_version() 282 if (newfd == -1) { in la_version() 291 if (fcntl(newfd, F_SETFD, FD_CLOEXEC) == -1) { in la_version() 299 if ((fp = fdopen(newfd, "wF")) != NULL) { in la_version()
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | fts.c | 1021 int ret, oerrno, newfd; in fts_safe_changedir() local 1024 newfd = fd; in fts_safe_changedir() 1031 if (fd < 0 && (newfd = open(path, O_RDONLY|O_CLOEXEC)) < 0) in fts_safe_changedir() 1033 if (fstat(newfd, &sb)) { in fts_safe_changedir() 1042 ret = fchdir(newfd); in fts_safe_changedir() 1046 (void) close(newfd); in fts_safe_changedir()
|
/illumos-gate/usr/src/cmd/sendmail/util/ |
H A D | mail.local.c | 532 int newfd; local 702 if ((newfd = dup(bfd)) >= 0) { 704 bfd = newfd; 706 if ((newfd = dup(hfd)) >= 0) { 708 hfd = newfd;
|
/illumos-gate/usr/src/cmd/nscd/ |
H A D | nscd_frontend.c | 1191 int newfd; in _nscd_setup_server() local 1195 if ((newfd = creat(TSOL_NAME_SERVICE_DOOR, 0444)) < 0) { in _nscd_setup_server() 1206 (void) close(newfd); in _nscd_setup_server() 1219 int newfd; in _nscd_setup_server() local 1223 if ((newfd = creat(NAME_SERVICE_DOOR, 0444)) < 0) { in _nscd_setup_server() 1232 (void) close(newfd); in _nscd_setup_server()
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | io.c | 1762 register int fd, savefd, newfd; in sh_iounsave() local 1763 for(newfd=fd=0; fd < shp->topfd; fd++) in sh_iounsave() 1766 filemap[newfd++] = filemap[fd]; in sh_iounsave() 1774 shp->topfd = newfd; in sh_iounsave() 2246 int newfd = integralof(data); in sftrack() local 2249 if(newfd<0) in sftrack() 2252 (*fdnotify)(sffileno(sp),flag==SF_CLOSING?-1:newfd); in sftrack() 2308 else if(flag==SF_CLOSING || (flag==SF_SETFD && newfd<=2)) in sftrack() 2601 int newfd, arg; in sh_fcntl() local 2606 newfd = fcntl(fd,op,arg); in sh_fcntl() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/ |
H A D | main.c | 2221 int newfd; in ndpd_cmd_handler() local 2228 newfd = accept(sock, (struct sockaddr *)&peer, &peerlen); in ndpd_cmd_handler() 2229 if (newfd < 0) { in ndpd_cmd_handler() 2234 retval = ipadm_ndpd_read(newfd, &ndpd_msg, sizeof (ndpd_msg)); in ndpd_cmd_handler() 2238 retval = ndpd_process_cmd(newfd, &ndpd_msg); in ndpd_cmd_handler() 2243 (void) close(newfd); in ndpd_cmd_handler() 2250 ndpd_process_cmd(int newfd, ipadm_ndpd_msg_t *msg) in ndpd_process_cmd() argument 2256 (void) ndpd_send_error(newfd, EPERM); in ndpd_process_cmd() 2283 (void) ndpd_send_error(newfd, err); in ndpd_process_cmd()
|
/illumos-gate/usr/src/cmd/dcs/sparc/sun4u/ |
H A D | dcs.c | 194 int newfd; in main() local 374 newfd = rdr_connect_srv(dcs_rcv.fd); in main() 376 if ((newfd == RDR_ERROR) || (newfd == RDR_NET_ERR)) { in main() 383 if (ses_start(newfd) == -1) { in main() 385 (void) rdr_close(newfd); in main()
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/edit/ |
H A D | history.c | 1191 register int newfd,oldfd; in hist_exceptf() local 1199 if((newfd=open(hp->histname,O_BINARY|O_APPEND|O_CREAT|O_RDWR,S_IRUSR|S_IWUSR)) >= 0) in hist_exceptf() 1201 if(fcntl(newfd, F_DUPFD, oldfd) !=oldfd) in hist_exceptf() 1204 close(newfd); in hist_exceptf()
|
/illumos-gate/usr/src/cmd/picl/picld/ |
H A D | picld.c | 1045 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()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/wpad/ |
H A D | wpa_supplicant.c | 604 int newfd; in wpa_supplicant_door_setup() local 605 if ((newfd = creat(doorname, 0666)) < 0) { in wpa_supplicant_door_setup() 612 (void) close(newfd); in wpa_supplicant_door_setup()
|
/illumos-gate/usr/src/lib/brand/solaris10/s10_brand/common/ |
H A D | s10_deleted.c | 294 int oldfd, const char *oldname, int newfd, const char *newname) in s10_renameat() argument 297 oldfd, oldname, newfd, newname)); in s10_renameat()
|
/illumos-gate/usr/src/lib/smbsrv/libmlsvc/common/ |
H A D | smb_quota.c | 1130 int newfd, dirfd, afd; in smb_quota_add_ctrldir() local 1194 if ((newfd = creat(file, 0640)) < 0) { in smb_quota_add_ctrldir() 1199 (void) close(newfd); in smb_quota_add_ctrldir()
|