Home
last modified time | relevance | path

Searched refs:fd (Results 26 – 50 of 2080) sorted by relevance

12345678910>>...84

/illumos-gate/usr/src/lib/libnsl/common/
H A Ddaemon_utils.c64 int fd, err; in _check_daemon_lock() local
79 (void) close(fd); in _check_daemon_lock()
91 int fd; in open_daemon_lock() local
128 (void) fchmod(fd, 0644); in open_daemon_lock()
130 return (fd); in open_daemon_lock()
141 int fd; in _enter_daemon_lock() local
159 (void) close(fd); in _enter_daemon_lock()
162 (void) close(fd); in _enter_daemon_lock()
167 (void) close(fd); in _enter_daemon_lock()
180 if (fd < 0) in _create_daemon_lock()
[all …]
/illumos-gate/usr/src/lib/libipmp/common/
H A Dipmp_mpathd.c57 int fd; in ipmp_connect() local
63 fd = socket(AF_INET, SOCK_STREAM, 0); in ipmp_connect()
64 if (fd == -1) in ipmp_connect()
95 (void) close(fd); in ipmp_connect()
104 flags = fcntl(fd, F_GETFL, 0); in ipmp_connect()
108 *fdp = fd; in ipmp_connect()
112 (void) close(fd); in ipmp_connect()
149 (void) ipmp_read(fd, value, *lenp, endtp); in ipmp_readtlv()
153 retval = ipmp_read(fd, value, *lenp, endtp); in ipmp_readtlv()
213 return (ipmp_write(fd, value, tlen)); in ipmp_writetlv()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/fexecve/
H A Dfexecve_test.c41 int fd; in forkit() local
55 if (fd < 0) { in forkit()
121 int fd = -1; in case_badf() local
142 int fd = 55; in case_bad_highf() local
164 int fd; in case_notexec() local
183 int fd; in case_cloexec() local
210 int fd; in case_uname() local
215 if (fd < 0) { in case_uname()
229 int fd; in case_uname_r() local
234 if (fd < 0) { in case_uname_r()
[all …]
/illumos-gate/usr/src/lib/libproc/common/
H A Dproc_arg.c52 int fd; in open_psinfo() local
71 fd = -1; in open_psinfo()
76 return (fd); in open_psinfo()
88 int fd; in open_core() local
98 fd = -1; in open_core()
102 fd = -1; in open_core()
110 return (fd); in open_core()
136 int fd; in proc_grab_common() local
440 int fd, i; in proc_walk() local
464 if (fd < 0) in proc_walk()
[all …]
/illumos-gate/usr/src/cmd/iscsiadm/
H A Dsun_ima.c288 int fd; in SUN_IMA_GetStaticTargetProperties() local
365 int fd; in SUN_IMA_AddStaticTarget() local
537 int fd; in SUN_IMA_SetTargetAuthParams() local
815 int fd; in SUN_IMA_SendTargets() local
947 int fd; in SUN_IMA_SetTargetBidirAuthFlag() local
980 int fd; in SUN_IMA_GetTargetBidirAuthFlag() local
1041 int fd; in SUN_IMA_RemoveTargetParam() local
2373 int fd; in setAuthMethods() local
2423 int fd; in getAuthMethods() local
2459 int *fd in open_driver() argument
[all …]
/illumos-gate/usr/src/test/nvme-tests/tests/ioctl/
H A Dmulti-lock-err.c98 if (ioctl(fd, NVME_IOC_LOCK, &lock) != 0) { in rec_lock_test()
159 int fd = nvme_ioctl_test_get_fd(0); in main() local
163 VERIFY0(close(fd)); in main()
168 fd = nvme_ioctl_test_get_fd(1); in main()
172 VERIFY0(close(fd)); in main()
180 int fd = nvme_ioctl_test_get_fd(0); in main() local
187 VERIFY0(close(fd)); in main()
189 fd = nvme_ioctl_test_get_fd(0); in main()
196 VERIFY0(close(fd)); in main()
198 fd = nvme_ioctl_test_get_fd(0); in main()
[all …]
/illumos-gate/usr/src/test/os-tests/tests/
H A Deventfd.c26 readn(int fd, uint_t n) in readn() argument
35 ret = eventfd_read(fd, &v); in readn()
51 check_nosem(int fd) in check_nosem() argument
57 ret = eventfd_read(fd, &v); in check_nosem()
78 check_badwrite(int fd) in check_badwrite() argument
101 int fd, failures = 0; in main() local
105 if (fd == -1) in main()
109 failures += readn(fd, 2); in main()
112 failures += check_nosem(fd); in main()
125 failures += readn(fd, 5); in main()
[all …]
/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftKeystoreUtil.c310 int fd, buf; in create_keystore() local
361 if (fd < 0) { in create_keystore()
588 int fd; in open_and_lock_keystore_desc() local
621 return (fd); in open_and_lock_keystore_desc()
681 int fd; in open_and_lock_object_file() local
711 return (fd); in open_and_lock_object_file()
972 int fd; in soft_keystore_lock_object() local
1804 int fd; in soft_keystore_authpin() local
2024 int fd; in soft_keystore_get_single_obj() local
2711 int fd; in soft_keystore_del_obj() local
[all …]
/illumos-gate/usr/src/cmd/lp/lib/filters/
H A Ddumpfilters.c58 int fd; in dumpfilters() local
98 (void)fdprintf(fd, "%s%s", sep, in dumpfilters()
108 fdprintlist (fd, pf->printers); in dumpfilters()
119 q_print(fd, pt->pattern); in dumpfilters()
120 (void)fdprintf(fd, " = "); in dumpfilters()
121 q_print(fd, pt->result); in dumpfilters()
126 (void)fdprintf(fd, FL_END); in dumpfilters()
129 close(fd); in dumpfilters()
138 q_print(int fd, char *str) in q_print() argument
156 fdputc ('\\', fd); in q_print()
[all …]
/illumos-gate/usr/src/lib/libresolv2/common/isc/
H A Dev_connects.c94 new->fd = fd; in evListen()
138 new->fd = fd; in evConnect()
191 close(acc->fd); in evCancelConn()
244 new->fd = accept(conn->fd, &new->ra.sa, &new->ralen); in evTryAccept()
246 close(new->fd); in evTryAccept()
247 new->fd = -1; in evTryAccept()
250 if (new->fd >= 0) { in evTryAccept()
254 (void) close(new->fd); in evTryAccept()
255 new->fd = -1; in evTryAccept()
338 if (fd < 0 && in connector()
[all …]
/illumos-gate/usr/src/lib/libdhcpagent/common/
H A Ddhcp_stable.c65 int fd; in read_stable_duid() local
88 (void) close(fd); in read_stable_duid()
103 int fd; in write_stable_duid() local
111 return (close(fd)); in write_stable_duid()
113 (void) close(fd); in write_stable_duid()
195 int fd; in read_stable_iaid() local
206 (void) close(fd); in read_stable_iaid()
220 int fd; in write_stable_iaid() local
241 (void) close(fd); in write_stable_iaid()
263 int fd; in make_stable_iaid() local
[all …]
/illumos-gate/usr/src/lib/libcontract/common/
H A Dlibcontract_priv.c50 close_on_exec(int fd) in close_on_exec() argument
85 int n, fd; in contract_open() local
99 if (fd != -1) { in contract_open()
102 (void) close(fd); in contract_open()
107 return (fd); in contract_open()
113 int fd, err; in contract_abandon_id() local
116 if (fd == -1) in contract_abandon_id()
120 (void) close(fd); in contract_abandon_id()
128 int fd; in getctid() local
134 (void) close(fd); in getctid()
[all …]
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/
H A Dlog.c109 int fd; in log() local
116 fd = 1; in log()
134 fdprintf(fd, "bad date: "); in log()
139 write(fd, buf, strlen(buf)); in log()
144 close(fd); in log()
158 int fd = open_logfile("exec"); in execlog() local
164 if (fd >= 0) { in execlog()
173 write(fd, buf, strlen(buf)); in execlog()
183 fdprintf(fd, " EX_SLOWF %s\n", in execlog()
211 fdprintf (fd, " EX_???\n"); in execlog()
[all …]
/illumos-gate/usr/src/lib/storage/libg_fc/common/
H A Dio.c573 g_scsi_release_cmd(int fd) in g_scsi_release_cmd() argument
579 if (fd < 0) { in g_scsi_release_cmd()
596 g_scsi_reserve_cmd(int fd) in g_scsi_reserve_cmd() argument
602 if (fd < 0) { in g_scsi_reserve_cmd()
619 g_scsi_start_cmd(int fd) in g_scsi_start_cmd() argument
629 if (fd < 0) { in g_scsi_start_cmd()
651 if (fd < 0) { in g_scsi_stop_cmd()
670 g_scsi_tur(int fd) in g_scsi_tur() argument
676 if (fd < 0) { in g_scsi_tur()
696 g_scsi_reset(int fd) in g_scsi_reset() argument
[all …]
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dipfs.c156 close(fd);
213 close(fd);
372 close(fd);
373 fd = -1;
376 return fd;
381 int fd; in closedevice()
383 close(fd);
405 int fd; in writestate()
457 int fd; in readstate()
564 int fd; in readnat()
[all …]
/illumos-gate/usr/src/uts/common/krtld/
H A Dbootrd.c73 int fd; in BRD_OPEN() local
81 fd = bbootfs_ops.fsw_open(file, flags); in BRD_OPEN()
84 return (fd); in BRD_OPEN()
87 return ((fd < 0) ? fd : (fd | BFD_F_SYSTEM_BOOT)); in BRD_OPEN()
95 if (fd & BFD_F_SYSTEM_BOOT) in BRD_CLOSE()
98 return (ops->fsw_close(fd)); in BRD_CLOSE()
104 if (fd & BFD_F_SYSTEM_BOOT) { in BRD_READ()
109 return (ops->fsw_read(fd, buf, len)); in BRD_READ()
115 if (fd & BFD_F_SYSTEM_BOOT) { in BRD_SEEK()
126 if (fd & BFD_F_SYSTEM_BOOT) in BRD_FSTAT()
[all …]
/illumos-gate/usr/src/test/os-tests/tests/poll/
H A Depoll_test.c28 int fd, flags; in main() local
30 fd = epoll_create1(0); in main()
31 assert(fd >= 0); in main()
33 flags = fcntl(fd, F_GETFD); in main()
35 (void) close(fd); in main()
38 fd = epoll_create1(EPOLL_CLOEXEC); in main()
39 assert(fd >= 0); in main()
41 flags = fcntl(fd, F_GETFD); in main()
43 (void) close(fd); in main()
46 assert(fd == -1 && errno == EINVAL); in main()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Ddaemon.c46 int retv, fd; in daemon() local
78 if ((fd = open("/dev/null", O_RDWR)) == -1) in daemon()
87 if ((fd != STDIN_FILENO) && (dup2(fd, STDIN_FILENO) < 0)) { in daemon()
88 (void) close(fd); in daemon()
91 if ((fd != STDOUT_FILENO) && (dup2(fd, STDOUT_FILENO) < 0)) { in daemon()
92 (void) close(fd); in daemon()
95 if ((fd != STDERR_FILENO) && (dup2(fd, STDERR_FILENO) < 0)) { in daemon()
96 (void) close(fd); in daemon()
100 if (fd > STDERR_FILENO) in daemon()
101 (void) close(fd); in daemon()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/
H A Dcontracts.c54 int fd; in create_contract_template() local
71 if (((err = ct_pr_tmpl_set_param(fd, in create_contract_template()
79 (void) close(fd); in create_contract_template()
83 return (fd); in create_contract_template()
181 int fd; in adopt_contract() local
203 if ((err = ct_ctl_adopt(fd)) != 0) { in adopt_contract()
210 err = close(fd); in adopt_contract()
221 int fd; in abandon_contract() local
232 if ((err = ct_ctl_abandon(fd)) != 0) { in abandon_contract()
233 (void) close(fd); in abandon_contract()
[all …]
/illumos-gate/usr/src/cmd/rmformat/
H A Drmf_menu.c115 int32_t fd; in process_options() local
145 if (fd < 0) { in process_options()
147 (void) close(fd); in process_options()
153 (void) close(fd); in process_options()
159 (void) close(fd); in process_options()
166 (void) close(fd); in process_options()
210 (void) close(fd); in process_options()
239 if (fd < 0) { in process_options()
296 (void) close(fd); in process_options()
761 if (fd < 0) { in process_p_flag()
[all …]
/illumos-gate/usr/src/tools/smatch/src/
H A Dsmatch_files.c27 int fd; in open_data_file() local
29 fd = open(filename, O_RDONLY); in open_data_file()
30 if (fd >= 0) in open_data_file()
31 return fd; in open_data_file()
41 int fd; in open_schema_file() local
43 fd = open_data_file(schema); in open_schema_file()
44 if (fd >= 0) in open_schema_file()
45 return fd; in open_schema_file()
52 int fd; in get_tokens_file() local
58 if (fd < 0) in get_tokens_file()
[all …]
/illumos-gate/usr/src/cmd/sendmail/db/os/
H A Dos_fsync.c27 __mpe_fsync(fd) in __mpe_fsync() argument
28 int fd; in __mpe_fsync()
32 FCONTROL(_MPE_FILENO(fd), 2, NULL); /* Flush the buffers */
33 FCONTROL(_MPE_FILENO(fd), 6, NULL); /* Write the EOF */
39 #define fsync(fd) __mpe_fsync(fd); argument
42 #define fsync(fd) _commit(fd); argument
52 __os_fsync(fd) in __os_fsync() argument
53 int fd; in __os_fsync()
57 ret = __db_jump.j_fsync != NULL ? __db_jump.j_fsync(fd) : fsync(fd);
/illumos-gate/usr/src/lib/print/libpapi-lpd/common/
H A Dlpd-port.c213 if (fd >= 0) { in next_job_id()
232 close(fd); in next_job_id()
417 int fd = -1; in send_data_file() local
437 close(fd); in send_data_file()
503 int fd, err; in submit_job() local
519 close(fd); in submit_job()
527 close(fd); in submit_job()
536 close(fd); in submit_job()
547 close(fd); in submit_job()
596 close(fd); in submit_job()
[all …]
/illumos-gate/usr/src/cmd/cdrw/
H A Dmmc.c39 test_unit_ready(int fd) in test_unit_ready() argument
54 inquiry(int fd, uchar_t *inq) in inquiry() argument
424 load_unload(int fd, int load) in load_unload() argument
447 prevent_allow_mr(int fd, int op) in prevent_allow_mr() argument
524 rezero_unit(int fd) in rezero_unit() argument
539 start_stop(int fd, int start) in start_stop() argument
557 flush_cache(int fd) in flush_cache() argument
604 format_media(int fd) in format_media() argument
683 reset_dev(int fd) in reset_dev() argument
702 uscsi_error = uscsi(fd, scmd); in reset_dev()
[all …]
H A Dbstream.c166 int fd; in file_stream_close() local
264 int fd; in open_file_read_stream() local
275 if (fd < 0) in open_file_read_stream()
397 if (fd < 0) in open_au_read_stream()
478 if (fd < 0) in open_wav_read_stream()
555 fd = -1; in open_au_write_stream()
558 if (fd < 0) in open_au_write_stream()
585 fd = -1; in open_wav_write_stream()
610 int fd; in open_aur_write_stream() local
627 int fd; in open_file_write_stream() local
[all …]

12345678910>>...84