Home
last modified time | relevance | path

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

12

/illumos-gate/usr/src/contrib/ast/src/lib/libast/sfio/
H A Dsfsetfd.c32 static int _sfdup(fd,newfd) in _sfdup()
34 int newfd;
49 newfd = _sfdup(fd,newfd);
54 return newfd;
61 int sfsetfd(f,newfd) in sfsetfd()
63 int newfd;
76 if(newfd < 0)
87 { if(newfd >= 0)
88 { if((newfd = _sfdup(oldfd,newfd)) < 0)
133 f->file = newfd;
[all …]
/illumos-gate/usr/src/boot/libsa/
H A Dnfs.c305 bcopy(repl->fhplusattr, &newfd->fh, newfd->fhsize); 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
529 newfd = NULL; in nfs_open()
554 newfd = malloc(sizeof (*newfd)); in nfs_open()
555 if (newfd == NULL) { in nfs_open()
614 free(newfd); in nfs_open()
615 newfd = NULL; in nfs_open()
621 currfd = newfd; in nfs_open()
622 newfd = NULL; in nfs_open()
[all …]
/illumos-gate/usr/src/cmd/sgs/ar/common/
H A Dfile.c481 int newfd; in mksymtab() local
487 newfd = 0; in mksymtab()
528 if ((newfd = in mksymtab()
543 newfd = 0; in mksymtab()
550 newfd = 0; in mksymtab()
580 newfd = 0; in mksymtab()
600 newfd = 0; in mksymtab()
621 newfd = 0; in mksymtab()
637 newfd = 0; in mksymtab()
687 if (newfd) { in mksymtab()
[all …]
/illumos-gate/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()
/illumos-gate/usr/src/cmd/audio/include/
H A DAudioUnixfile_inline.h45 int newfd) // new file descriptor in setfd() argument
47 fd = newfd; in setfd()
/illumos-gate/usr/src/cmd/picl/plugins/common/piclevent/
H A Dpiclevent.c194 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 Dmpd_main.c2272 int newfd; in loopback_cmd() local
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()
2341 (void) close(newfd); in loopback_cmd()
2359 (void) close(newfd); in loopback_cmd()
2366 (void) close(newfd); in loopback_cmd()
2376 (void) close(newfd); in loopback_cmd()
2383 (void) close(newfd); in loopback_cmd()
[all …]
/illumos-gate/usr/src/cmd/smbsrv/smbd/
H A Dsmbd_pipesvc.c182 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 Dsmbd_share_doorsvc.c64 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 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.c369 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 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()
/illumos-gate/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()
/illumos-gate/usr/src/lib/abi/apptrace/common/
H A Dapptrace.c235 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 Dfts.c1021 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 Dmail.local.c532 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 Dnscd_frontend.c1191 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 Dio.c1762 register int fd, savefd, newfd; in sh_iounsave() local
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()
2601 int newfd, arg; in sh_fcntl() local
2606 newfd = fcntl(fd,op,arg); in sh_fcntl()
2609 VALIDATE_FD(shp, newfd); in sh_fcntl()
2611 if(newfd>=0) switch(op) in sh_fcntl()
2618 (*fdnotify)(fd,newfd); in sh_fcntl()
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/
H A Dmain.c2217 int newfd; in ndpd_cmd_handler() local
2224 newfd = accept(sock, (struct sockaddr *)&peer, &peerlen); in ndpd_cmd_handler()
2225 if (newfd < 0) { in ndpd_cmd_handler()
2230 retval = ipadm_ndpd_read(newfd, &ndpd_msg, sizeof (ndpd_msg)); in ndpd_cmd_handler()
2234 retval = ndpd_process_cmd(newfd, &ndpd_msg); in ndpd_cmd_handler()
2239 (void) close(newfd); in ndpd_cmd_handler()
2246 ndpd_process_cmd(int newfd, ipadm_ndpd_msg_t *msg) in ndpd_process_cmd() argument
2252 (void) ndpd_send_error(newfd, EPERM); in ndpd_process_cmd()
2279 (void) ndpd_send_error(newfd, err); in ndpd_process_cmd()
/illumos-gate/usr/src/cmd/dcs/sparc/sun4u/
H A Ddcs.c194 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 Dhistory.c1191 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 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()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/wpad/
H A Dwpa_supplicant.c604 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 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()
/illumos-gate/usr/src/lib/smbsrv/libmlsvc/common/
H A Dsmb_quota.c1130 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()

12