Home
last modified time | relevance | path

Searched refs:fd (Results 126 – 150 of 2079) sorted by relevance

12345678910>>...84

/illumos-gate/usr/src/uts/common/fs/portfs/
H A Dport_fd.c179 int fd; in port_associate_fd() local
193 fd = object; in port_associate_fd()
211 releasef(fd); in port_associate_fd()
333 releasef(fd); in port_associate_fd()
399 releasef(fd); in port_associate_fd()
425 releasef(fd); in port_associate_fd()
443 int fd; in port_dissociate_fd() local
453 fd = object; in port_dissociate_fd()
468 releasef(fd); in port_dissociate_fd()
507 releasef(fd); in port_dissociate_fd()
[all …]
/illumos-gate/usr/src/cmd/fs.d/ufs/lockfs/
H A Dlockfs.c251 int fd; in printstatus() local
258 if (fd == -1) { in printstatus()
275 close(fd); in printstatus()
337 close(fd); in printstatus()
346 int fd; in flushfs() local
357 close(fd); in flushfs()
361 close(fd); in flushfs()
370 int fd; in lockfs() local
385 close(fd); in lockfs()
407 close(fd); in lockfs()
[all …]
/illumos-gate/usr/src/lib/libcryptoutil/common/
H A Drandom.c62 int fd; in open_nointr() local
71 if ((fd = open(path, oflag, pmode)) >= 0) { in open_nointr()
72 (void) fcntl(fd, F_SETFD, FD_CLOEXEC); in open_nointr()
77 return (fd); in open_nointr()
139 if (*fd < 0) in pkcs11_open_common()
140 *fd = open_nointr(dev, oflag); in pkcs11_open_common()
143 return (*fd); in pkcs11_open_common()
181 (void) close(*fd); in pkcs11_close_common()
182 *fd = -1; in pkcs11_close_common()
219 n = readn_nointr(*fd, dbuf, dlen); in pkcs11_read_common()
[all …]
/illumos-gate/usr/src/lib/libdiskmgt/common/
H A Dinuse_lu.c66 static int lustatus(int fd);
67 static int lufslist(int fd);
172 int fd; in load_lu() local
179 status = lustatus(fd); in load_lu()
181 (void) close(fd); in load_lu()
193 lufslist(int fd) in lufslist() argument
200 (void) close(fd); in lufslist()
251 lustatus(int fd) in lustatus() argument
258 (void) close(fd); in lustatus()
316 (void) dup(fd); in run_cmd()
[all …]
H A Dmedia.c123 int fd; in media_get_attributes() local
142 if (fd >= 0) { in media_get_attributes()
143 (void) close(fd); in media_get_attributes()
311 int fd; in apply_filter() local
318 if (media_read_info(fd, &minfo)) { in apply_filter()
338 (void) close(fd); in apply_filter()
375 if (fd < 0) {
382 if (!media_read_info(fd, &minfo)) {
386 if (partition_has_fdisk(dp, fd)) {
541 int fd; local
[all …]
H A Dslice.c123 int fd; in slice_get_attributes() local
145 if (fd >= 0) { in slice_get_attributes()
146 (void) close(fd); in slice_get_attributes()
365 if (fd < 0) { in get_attrs()
518 int fd; in get_fixed_assocs() local
539 (void) close(fd); in get_fixed_assocs()
543 (void) close(fd); in get_fixed_assocs()
620 int fd; in get_slice_num() local
664 int fd; in make_fixed_descriptors() local
719 int fd; in match_fixed_name() local
[all …]
/illumos-gate/usr/src/test/os-tests/tests/uccid/
H A Dexcl-loop.c37 int fd, ret; in main() local
45 if ((fd = open(argv[1], O_RDWR)) < 0) { in main()
56 if (ioctl(fd, UCCID_CMD_TXN_BEGIN, &begin) != 0) { in main()
60 ret = ioctl(fd, UCCID_CMD_TXN_BEGIN, &begin); in main()
64 if (ioctl(fd, UCCID_CMD_TXN_END, &end) != 0) { in main()
68 VERIFY0(close(fd)); in main()
70 if ((fd = open(argv[1], O_RDWR)) < 0) { in main()
74 ret = ioctl(fd, UCCID_CMD_TXN_BEGIN, &begin); in main()
77 ret = ioctl(fd, UCCID_CMD_TXN_BEGIN, &begin); in main()
81 VERIFY0(close(fd)); in main()
/illumos-gate/usr/src/lib/print/libprint/common/
H A Dnss_write.c96 int fd; in _file_put_printer() local
113 fd = open(file, O_RDWR); in _file_put_printer()
114 if (fd < 0) { in _file_put_printer()
120 if (lockf(fd, F_TLOCK, 0) == 0) in _file_put_printer()
122 (void) close(fd); in _file_put_printer()
126 (void) close(fd); in _file_put_printer()
131 if ((fd = mkstemp(tmpfile)) < 0) { in _file_put_printer()
137 (void) fchmod(fd, 0644); in _file_put_printer()
183 (void) close(fd); in _file_put_printer()
225 int fd; in remote_command() local
[all …]
/illumos-gate/usr/src/lib/libnsl/dial/
H A Dulockf.c95 int fd; in cklock() local
97 fd = open(name, O_RDONLY); in cklock()
99 if (fd == -1) { in cklock()
108 (void) close(fd); in cklock()
196 int fd; in onelock() local
200 if (fd < 0) { in onelock()
218 (void) close(fd); in onelock()
246 fd_mklock(int fd) in fd_mklock() argument
252 if (fstat64(fd, &_st_buf) != 0) in fd_mklock()
286 fd_rmlock(int fd) in fd_rmlock() argument
[all …]
H A Dcallers.c472 int fd; in tlicall() local
499 if (fd < 0) { in tlicall()
505 (void) t_close(fd); in tlicall()
535 fd_rmlock(fd); in tlicall()
536 (void) t_close(fd); in tlicall()
574 fd_rmlock(fd); in tlicall()
599 fd_rmlock(fd); in tlicall()
600 (void) t_close(fd); in tlicall()
622 fd_rmlock(fd); in tlicall()
634 fd_rmlock(fd); in tlicall()
[all …]
H A Dinterface.c155 tread(int fd, char *buf, unsigned nbytes) in tread() argument
174 if (t_getinfo(fd, &info) != 0) { in twrite()
175 tfaillog(fd, "twrite: t_getinfo\n"); in twrite()
184 if (t_getstate(fd) != T_DATAXFER) in twrite()
212 tioctl(int fd, int request, ...) in tioctl() argument
273 tfaillog(int fd, const char *s) in tfaillog() argument
285 show_tlook(fd); in tfaillog()
300 show_tlook(int fd) in show_tlook() argument
309 switch (reason = t_getstate(fd)) { in show_tlook()
322 switch (reason = t_look(fd)) { in show_tlook()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/comp/
H A Dopen.c50 int fd;
73 if ((fd = creat(path, (op & O_EXCL) ? 0 : mode)) < 0)
77 if (fstat(fd, &st) || (st.st_mode & S_IPERM))
80 close(fd);
84 if (mode && fchmod(fd, mode))
92 close(fd);
97 else if ((fd = open(path, op & (_ast_O_LOCAL-1), mode)) < 0)
106 else if ((op & O_APPEND) && lseek(fd, 0L, SEEK_END) == -1L)
109 if ((op & O_NOCTTY) && ioctl(fd, TIOCNOTTY, 0))
115 else fd = open(path, op, mode);
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dattropen.c51 int fd; in attropen64() local
58 if ((fd = open64(file, O_RDONLY|O_NONBLOCK)) == -1) { in attropen64()
63 if ((attrfd = openat64(fd, attr, oflag | O_XATTR, in attropen64()
66 (void) close(fd); in attropen64()
72 (void) close(fd); in attropen64()
82 int fd; in attropen() local
89 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) { in attropen()
94 if ((attrfd = openat(fd, attr, oflag | O_XATTR, in attropen()
97 (void) close(fd); in attropen()
103 (void) close(fd); in attropen()
/illumos-gate/usr/src/lib/libnsl/rpc/
H A Dsvc.c143 int fd; member
277 int fd = pfd->fd; in __svc_getreq_user() local
284 if ((fd < 0) || (fd >= svc_nuserfds)) { in __svc_getreq_user()
344 if ((fd < 0) || (fd >= svc_nuserfds)) in __is_a_userfd()
390 if ((fd < 0) || (fd >= svc_nuserfds)) in __svc_remove_input_of_fd()
526 fd = node->fd; /* caching optim */ in svc_remove_input()
655 svc_pollfd[fd].fd = fd; in add_pollfd()
668 if (fd < FD_SETSIZE && FD_ISSET(fd, &svc_fdset)) { in clear_pollfd()
695 svc_pollfd[fd].fd = fd; in set_pollfd()
837 if ((fd < nsvc_xports) && (svc_xports[fd] == xprt)) { in __xprt_unregister_private()
[all …]
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dipf.c60 static int fd = -1; variable
179 if (fd != -1)
180 (void) close(fd);
202 if (fd == -1)
207 if (setzone(fd) != 0) {
208 close(fd);
212 return fd;
218 close(fd); in closedevice()
219 fd = -1; in closedevice()
269 int fd; in ipf_interceptadd()
[all …]
/illumos-gate/usr/src/lib/libnsl/nsl/
H A Dt_open.c64 int retval, fd, sv_errno; in _tx_open() local
81 if ((fd = open(path, flags)) < 0) { in _tx_open()
92 retval = ioctl(fd, I_FIND, "timod"); in _tx_open()
99 (void) close(fd); in _tx_open()
113 retval = ioctl(fd, I_PUSH, "timod"); in _tx_open()
120 (void) close(fd); in _tx_open()
142 tiptr = _t_create(fd, info, api_semantics, &ticap_ioctl_failed); in _tx_open()
151 (void) close(fd); in _tx_open()
159 (void) close(fd); in _tx_open()
176 retval = ioctl(fd, I_FLUSH, FLUSHRW); in _tx_open()
[all …]
/illumos-gate/usr/src/cmd/fdformat/
H A Dfdformat.c156 int fd; in main() local
428 write_NEC_DOS_label(fd, vollabel); in main()
434 if (ioctl(fd, FDEJECT, 0)) { in main()
494 (void) ioctl(fd, FDDEFGEOCHAR, NULL); in format_diskette()
1019 if (lseek(fd, (off_t)0, 0) != 0) { in format_diskette()
1041 restore_default_chars(int fd, in restore_default_chars() argument
1229 verify(int fd, int blk, int len) in verify() argument
1236 if (lseek(fd, off, 0) != off) { in verify()
1244 if (write(fd, ibuf1, len) != len) { in verify()
1259 if (lseek(fd, off, 0) != off) { in verify()
[all …]
/illumos-gate/usr/src/cmd/fs.d/pcfs/fsck/
H A Ddir.c665 createCHKNameList(int fd) in createCHKNameList() argument
910 seekRootDirectory(int fd) in seekRootDirectory() argument
929 getRootDirectory(int fd) in getRootDirectory() argument
938 (void) close(fd); in getRootDirectory()
942 if (seekRootDirectory(fd) < 0) { in getRootDirectory()
945 (void) close(fd); in getRootDirectory()
961 (void) close(fd); in getRootDirectory()
973 writeRootDirMods(int fd) in writeRootDirMods() argument
980 (void) close(fd); in writeRootDirMods()
998 (void) close(fd); in writeRootDirMods()
[all …]
/illumos-gate/usr/src/lib/libc/port/stdio/
H A D_findbuf.c58 int fd = _get_fd(iop); in _findbuf() local
70 tty = isatty(fd); in _findbuf()
76 if (fd >= 0 && fd < _NFILE) { in _findbuf()
77 buf = _smbuf[fd]; in _findbuf()
82 } else if (fd >= 0 && fd < 2 && tty != 0) { in _findbuf()
84 buf = (fd == 0) ? _sibuf : _sobuf; in _findbuf()
94 if (fd != -1 && fstat64(fd, &stbuf) == 0 && stbuf.st_blksize > in _findbuf()
H A D_endopen.c58 int oflag, fd, fflag; in _endopen() local
69 fd = open64(name, oflag, 0666); in _endopen()
71 fd = open(name, oflag, 0666); in _endopen()
73 if (fd < 0) in _endopen()
78 iop->_file = fd; in _endopen()
81 if (fd <= _FILE_FD_MAX) { in _endopen()
82 SET_FILE(iop, fd); in _endopen()
83 } else if (_file_set(iop, fd, type) != 0) { in _endopen()
86 (void) close(fd); in _endopen()
/illumos-gate/usr/src/cmd/fs.d/nfs/lib/
H A Dnfslogtab.c134 logtab_putent(FILE *fd, struct logtab_ent *lep) in logtab_putent() argument
138 if (fseek(fd, 0L, SEEK_END) < 0) in logtab_putent()
141 r = fprintf(fd, "%s\t%s\t%s\t%d\n", in logtab_putent()
216 rewind(fd); in logtab_rement()
266 if (ftruncate(fileno(fd), 0) < 0) { in logtab_rement()
272 (void) logtab_putent(fd, tmpl->lel_le); in logtab_rement()
300 rewind(fd); in logtab_deactivate()
349 if (ftruncate(fileno(fd), 0) < 0) { in logtab_deactivate()
355 (void) logtab_putent(fd, lelp->lel_le); in logtab_deactivate()
370 logtab_deactivate_after_boot(FILE *fd) in logtab_deactivate_after_boot() argument
[all …]
/illumos-gate/usr/src/lib/storage/liba5k/common/
H A Ddiag.c212 int fd, i; in l_bp_bypass_enable() local
247 (void) close(fd); in l_bp_bypass_enable()
251 (void) close(fd); in l_bp_bypass_enable()
260 (void) close(fd); in l_bp_bypass_enable()
267 (void) close(fd); in l_bp_bypass_enable()
282 (void) close(fd); in l_bp_bypass_enable()
296 (void) close(fd); in l_bp_bypass_enable()
351 (void) close(fd); in l_bp_bypass_enable()
375 (void) close(fd); in l_bp_bypass_enable()
381 (void) close(fd); in l_bp_bypass_enable()
[all …]
/illumos-gate/usr/src/cmd/ttymon/
H A Dulockf.c108 int fd; in cklock() local
110 fd = open(name, O_RDONLY); in cklock()
112 if (fd == -1) { in cklock()
120 (void) close(fd); in cklock()
282 int fd; in onelock() local
286 if (fd < 0) { in onelock()
302 (void) close(fd); in onelock()
329 fd_mklock(int fd) in fd_mklock() argument
333 if (fstat(fd, &_st_buf) != 0) in fd_mklock()
391 fd_cklock(int fd) in fd_cklock() argument
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/sfio/
H A Dsfpkrd.c42 ssize_t sfpkrd(fd, argbuf, n, rc, tm, action) in sfpkrd()
43 int fd; /* file descriptor */ in sfpkrd()
59 return sysreadf(fd,buf,n);
103 if((r = ioctl(fd,I_PEEK,&pbuf)) < 0)
112 r = sysreadf(fd,buf,1);
138 po.fd = fd;
163 FD_SET(fd,&rd);
181 else r = FD_ISSET(fd,&rd) ? 1 : -1;
214 return sysreadf(fd,buf,n);
280 r = sysreadf(fd,buf,1);
[all …]
/illumos-gate/usr/src/tools/smatch/src/smatch_data/
H A Dkernel.implicit_dependencies.v1607 SYSC_ioctl read_list: [(struct fd)->file, (struct fd)->flags, ]
660 SYSC_getdents read_list: [(struct fd)->file, (struct fd)->flags, ]
688 SYSC_fgetxattr read_list: [(struct fd)->file, (struct fd)->flags, ]
765 SYSC_write read_list: [(struct fd)->file, (struct fd)->flags, ]
766 SYSC_read read_list: [(struct fd)->file, (struct fd)->flags, ]
767 SYSC_llseek read_list: [(struct fd)->file, (struct fd)->flags, ]
769 SYSC_lseek read_list: [(struct fd)->file, (struct fd)->flags, ]
810 SYSC_syncfs read_list: [(struct fd)->file, (struct fd)->flags, ]
841 SYSC_fchown read_list: [(struct fd)->file, (struct fd)->flags, ]
847 SYSC_fchmod read_list: [(struct fd)->file, (struct fd)->flags, ]
[all …]

12345678910>>...84