Home
last modified time | relevance | path

Searched refs:fd (Results 226 – 250 of 2079) sorted by relevance

12345678910>>...84

/illumos-gate/usr/src/psm/stand/cpr/common/
H A Dsupport.c45 cpr_read_cprinfo(int fd, char *file_path, char *fs_path) in cpr_read_cprinfo() argument
69 int fd; in cpr_locate_statefile() local
72 if ((fd = cpr_fs_open(CPR_CONFIG)) != -1) { in cpr_locate_statefile()
73 rc = cpr_read_cprinfo(fd, file_path, fs_path); in cpr_locate_statefile()
74 (void) cpr_fs_close(fd); in cpr_locate_statefile()
94 int fd, len, rc, prop_errors; in cpr_reset_properties() local
102 if ((fd = cpr_fs_open(default_path)) == -1) { in cpr_reset_properties()
109 len = cpr_fs_read(fd, (char *)&cdef, sizeof (cdef)); in cpr_reset_properties()
118 (void) cpr_fs_close(fd); in cpr_reset_properties()
159 cpr_read_cdump(int fd, cdd_t *cdp, ushort_t mach_type) in cpr_read_cdump() argument
[all …]
/illumos-gate/usr/src/uts/common/io/mac/
H A Dmac_flow.c239 if (fd == NULL) { in mac_flow_create()
248 bcopy(fd, &flent->fe_flow_desc, sizeof (*fd)); in mac_flow_create()
879 bcopy(&flent->fe_flow_desc, fd, sizeof (*fd)); in mac_flow_get_desc()
908 bcopy(fd, &flent->fe_flow_desc, sizeof (*fd)); in mac_flow_set_desc()
925 bcopy(fd, &flent->fe_flow_desc, sizeof (*fd)); in mac_flow_set_desc()
1633 bcmp(l2->l2_daddr, fd->fd_dst_mac, fd->fd_mac_len) == 0); in flow_l2_match()
1714 ASSERT((fd->fd_mask & FLOW_LINK_VID) != 0 || fd->fd_vid == 0); in flow_ether_hash_fe()
1839 fd->fd_dsfield_mask) == fd->fd_dsfield); in flow_ip_dsfield_match()
1845 fd->fd_dsfield_mask) == fd->fd_dsfield); in flow_ip_dsfield_match()
2230 &fd->fd_local_netmask : &fd->fd_remote_netmask; in flow_ip_insert_fe()
[all …]
/illumos-gate/usr/src/cmd/lp/model/
H A Dlp.cat.c82 int get_ecpp_status(int fd);
101 is_a_parallel_bpp(int fd) in is_a_parallel_bpp() argument
127 bpp_state(int fd) in bpp_state() argument
129 if (ioctl(fd, BPPIOC_TESTIO)) { in bpp_state()
169 get_ecpp_status(int fd) in get_ecpp_status() argument
202 is_a_prnio(int fd) in is_a_prnio() argument
222 prnio_state(int fd) in prnio_state() argument
329 wait_state(int fd, int get_state()) in wait_state() argument
334 while (state = get_state(fd)) { in wait_state()
385 nop(int fd) in nop() argument
[all …]
/illumos-gate/usr/src/common/ficl/
H A Dloader.c638 int fd; in isdirQuestion() local
645 if (fd < 0) in isdirQuestion()
706 int fd; in pfclose() local
722 int fd, len; in pfread() local
749 int fd; in pfopendir()
790 if (fd < 0) in pfopendir()
803 close(fd); in pfopendir()
819 int fd; in pfreaddir()
872 int fd; in pfclosedir()
895 int fd; in pfload() local
[all …]
/illumos-gate/usr/src/test/zfs-tests/cmd/rm_lnkcnt_zero_file/
H A Drm_lnkcnt_zero_file.c102 int *fd = (int *)a; in writer() local
105 (void) close (*fd); in writer()
106 *fd = open(filebase, O_APPEND | O_RDWR | O_CREAT, 0644); in writer()
107 if (*fd < 0) in writer()
109 (void) write(*fd, "test\n", 5); in writer()
118 int fd; in main() local
127 fd = open(filebase, O_APPEND | O_RDWR | O_CREAT, 0644); in main()
128 if (fd < 0) { in main()
136 (void) pthread_create(&tid, NULL, writer, (void *) &fd); in main()
/illumos-gate/usr/src/lib/libadm/common/
H A Dputdgrp.c151 if (fstat64(fd, &sbuf) == -1) { in opennewdgrptab()
152 (void) close(fd); in opennewdgrptab()
155 (void) close(fd); in opennewdgrptab()
666 if (fd = opennewdgrptab(&path)) { in _adddgrptabrec()
685 (void) fclose(fd); in _adddgrptabrec()
688 (void) fclose(fd); in _adddgrptabrec()
751 (void) fclose(fd); in _rmdgrptabrec()
754 (void) fclose(fd); in _rmdgrptabrec()
873 if (fd = opennewdgrptab(&path)) { in _rmdgrpmems()
881 (void) fclose(fd); in _rmdgrpmems()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/threads/
H A Dthread_name.c52 int fd; in main() local
185 fd = open(path, O_RDWR); in main()
187 if (fd == -1) in main()
190 n = read(fd, name, sizeof (name)); in main()
195 if (lseek(fd, 0, SEEK_SET) != 0) in main()
203 if (lseek(fd, 0, SEEK_SET) != 0) in main()
206 n = read(fd, name, 4); in main()
214 if (lseek(fd, 0, SEEK_SET) != 0) in main()
223 if (lseek(fd, 0, SEEK_SET) != 0) in main()
231 if (lseek(fd, 0, SEEK_SET) != 0) in main()
[all …]
/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Dlocal.h145 # define SM_CONVERT_TIME(fp, fd, val, time) { \ argument
168 ret = fcntl((fd), F_GETFL, 0); \
169 if (ret == -1 || fcntl((fd), F_SETFL, \
184 ret = fcntl((fd), F_GETFL, 0); \
185 if (ret == -1 || fcntl((fd), F_SETFL, \
224 #define SM_IO_WR_TIMEOUT(fp, fd, to) { \ argument
247 if (FD_SETSIZE > 0 && (fd) >= FD_SETSIZE) \
253 FD_SET((fd), &sm_io_to_mask); \
255 FD_SET((fd), &sm_io_x_mask); \
292 #define IS_IO_ERROR(fd, ret, to) \ argument
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A D_xftw.c274 int fd, cfd; in nocdopendir() local
296 (void) close(fd); in nocdopendir()
301 (void) close(fd); in nocdopendir()
302 fd = cfd; in nocdopendir()
305 return (fdopendir(fd)); in nocdopendir()
321 int fd, cfd; in nocdstat() local
345 (void) close(fd); in nocdstat()
350 (void) close(fd); in nocdstat()
351 fd = cfd; in nocdstat()
354 rc = fstatat(fd, unrootp, statp, sym); in nocdstat()
[all …]
H A Dposix_fallocate.c37 fallocate_errno(int fd) in fallocate_errno() argument
42 if (fstat64(fd, &statb) != 0) /* can't happen? */ in fallocate_errno()
55 posix_fallocate(int fd, off_t offset, off_t len) in posix_fallocate() argument
68 if (fcntl(fd, F_ALLOCSP, &lck) == -1) { in posix_fallocate()
70 error = fallocate_errno(fd); in posix_fallocate()
81 posix_fallocate64(int fd, off64_t offset, off64_t len) in posix_fallocate64() argument
94 if (fcntl(fd, F_ALLOCSP64, &lck) == -1) { in posix_fallocate64()
96 error = fallocate_errno(fd); in posix_fallocate64()
H A Dgetvfsent.c85 while ((ret = getvfsent(fd, vgetp)) == 0 && in getvfsspec()
99 getvfsfile(FILE *fd, struct vfstab *vp, char *mountp) in getvfsfile() argument
105 return (getvfsany(fd, vp, &vv)); in getvfsfile()
115 off64_t start = ftello64(fd); in getvfsany()
118 while ((ret = getvfsent(fd, vgetp)) == 0 && in getvfsany()
136 (void) fseeko64(fd, start, SEEK_SET); in getvfsany()
154 while ((ret = getvfsent(fd, vgetp)) == 0 && in getvfsany()
169 getvfsent(FILE *fd, struct vfstab *vp) in getvfsent() argument
179 if ((ret = getaline(line, fd)) != 0) in getvfsent()
199 getaline(char *lp, FILE *fd) in getaline() argument
[all …]
/illumos-gate/usr/src/cmd/xhci/
H A Dxhci_portsc.c160 int fd, i; in xp_dump() local
163 fd = open(path, O_RDWR); in xp_dump()
164 if (fd < 0) { in xp_dump()
171 (void) close(fd); in xp_dump()
186 int fd, i; in xp_set_pls() local
189 fd = open(path, O_RDWR); in xp_set_pls()
190 if (fd < 0) { in xp_set_pls()
210 (void) close(fd); in xp_set_pls()
216 int fd; in xp_clear_change() local
220 if (fd < 0) { in xp_clear_change()
[all …]
/illumos-gate/usr/src/cmd/hal/probing/acpi/
H A Dprobe-acpi.c35 int fd = -1; in main() local
57 if ((fd = open(device_file, O_RDONLY | O_NONBLOCK)) < 0) { in main()
62 ac_adapter_update(ctx, udi, fd); in main()
64 battery_update(ctx, udi, fd); in main()
66 lid_update(ctx, udi, fd); in main()
68 laptop_panel_update(ctx, udi, fd); in main()
74 if (fd >= 0) { in main()
75 close(fd); in main()
/illumos-gate/usr/src/lib/libdiskmgt/common/
H A Ddrive.c415 int fd; in drive_get_attributes() local
431 if (fd >= 0) { in drive_get_attributes()
579 int fd; in drive_get_stats() local
596 (void) close(fd); in drive_get_stats()
869 if (fd >= 0 && media_read_info(fd, &minfo)) { in get_attrs()
886 if (fd >= 0 && media_read_info(fd, &minfo)) { in get_attrs()
1002 if (fd < 0) { in get_drive_type()
1159 if (fd < 0) { in get_rpm()
1164 if (fd >= 0) { in get_rpm()
1215 if (fd < 0) { in get_solidstate()
[all …]
/illumos-gate/usr/src/cmd/fs.d/smbclnt/fksmbcl/
H A Dfkdev.c58 int fd; in smb_open_driver() local
68 fd = (int)dev; in smb_open_driver()
70 return (fd); in smb_open_driver()
74 nsmb_ioctl(int fd, int cmd, void *arg) in nsmb_ioctl() argument
79 dev = (dev32_t)fd; in nsmb_ioctl()
90 nsmb_close(int fd) in nsmb_close() argument
94 dev = (dev32_t)fd; in nsmb_close()
/illumos-gate/usr/src/cmd/fm/mcdecode/
H A Dmcdecode.c170 int fd, ret; in mcdecode_from_file() local
180 if (fstat(fd, &st) != 0) { in mcdecode_from_file()
186 fd, 0); in mcdecode_from_file()
200 if (close(fd) != 0) { in mcdecode_from_file()
226 int fd; in mcdecode_pa() local
287 (void) close(fd); in mcdecode_pa()
293 int fd; in mcdecode_dump() local
314 (void) close(fd); in mcdecode_dump()
325 ret = write(fd, buf, out); in mcdecode_dump()
336 if (fsync(fd) != 0) { in mcdecode_dump()
[all …]
/illumos-gate/usr/src/grub/grub-0.97/lib/
H A Ddevice.c142 int fd; in get_drive_geometry() local
150 fd = geom->flags; in get_drive_geometry()
280 close (fd); in get_drive_geometry()
358 int fd; in get_ide_disk_name()
365 close (fd); in get_ide_disk_name()
401 int fd; in get_scsi_disk_name()
408 close (fd); in get_scsi_disk_name()
874 int fd; in write_to_partition() local
896 if (fd < 0) in write_to_partition()
933 close (fd); in write_to_partition()
[all …]
/illumos-gate/usr/src/test/zfs-tests/cmd/randwritecomp/
H A Drandwritecomp.c54 rwc_pwrite(int fd, const void *buf, size_t nbytes, off_t offset) in rwc_pwrite() argument
59 nwrite = pwrite(fd, buf, nbytes, offset); in rwc_pwrite()
106 sequential_writes(int fd, char *buf, uint64_t nblocks, int64_t n) in sequential_writes() argument
114 rwc_pwrite(fd, buf, BLOCKSZ, j * BLOCKSZ); in sequential_writes()
122 random_writes(int fd, char *buf, uint64_t nblocks, int64_t n) in random_writes() argument
126 rwc_pwrite(fd, buf, BLOCKSZ, (lrand48() % nblocks) * BLOCKSZ); in random_writes()
133 int fd, err; in main() local
159 fd = open(filename, O_RDWR|O_CREAT, 0666); in main()
160 err = fstat(fd, &ss); in main()
187 sequential_writes(fd, buf, nblocks, n); in main()
[all …]
/illumos-gate/usr/src/test/nvme-tests/tests/ioctl/
H A Dbasic-lock.c78 basic_lock_test(const basic_lock_test_t *test, int fd) in basic_lock_test() argument
94 if (ioctl(fd, NVME_IOC_LOCK, &lock) != 0) { in basic_lock_test()
108 if (ioctl(fd, NVME_IOC_UNLOCK, &unlock) != 0) { in basic_lock_test()
127 basic_lock_test_no_ns_ctrl(const basic_lock_test_t *test, int fd) in basic_lock_test_no_ns_ctrl() argument
138 if (ioctl(fd, NVME_IOC_LOCK, &lock) != 0) { in basic_lock_test_no_ns_ctrl()
163 int fd = nvme_ioctl_test_get_fd(0); in main() local
167 if (!basic_lock_test(&basic_lock_tests[i], fd)) { in main()
172 VERIFY0(close(fd)); in main()
174 fd = nvme_ioctl_test_get_fd(1); in main()
176 if (!basic_lock_test(&basic_ns_lock_tests[i], fd)) { in main()
[all …]
/illumos-gate/usr/src/test/zfs-tests/cmd/mmapwrite/
H A Dmmapwrite.c48 int fd = *(int *)fdp; in mapper() local
51 mmap(0, 8192, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { in mapper()
57 MAP_SHARED|MAP_FIXED, fd, 0) == MAP_FAILED) { in mapper()
69 int fd; in main() local
77 if ((fd = open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 0666)) == -1) { in main()
82 if (pthread_create(NULL, NULL, mapper, &fd) != 0) { in main()
87 if (write(fd, buf, sizeof (buf)) == -1) { in main()
/illumos-gate/usr/src/lib/libcryptoutil/common/
H A Dkeyfile.c49 int fd = -1; in pkcs11_read_data() local
59 if ((fd = open(filename, O_RDONLY | O_NONBLOCK)) == -1) { in pkcs11_read_data()
65 if (fstat(fd, &statbuf) == -1) { in pkcs11_read_data()
88 (void) close(fd); in pkcs11_read_data()
102 if (read(fd, filebuf, filesize) != filesize) { in pkcs11_read_data()
117 nread = read(fd, marker, left); in pkcs11_read_data()
140 (void) close(fd); in pkcs11_read_data()
146 if (fd != -1) in pkcs11_read_data()
147 (void) close(fd); in pkcs11_read_data()
/illumos-gate/usr/src/lib/cfgadm_plugins/fp/common/
H A Dcfga_rep.c151 return (fcntl(fd, cmd, &lock)); in lock_register()
156 if (fd != -1) { \
157 close(fd); \
231 fd = copy_fd = tmp_fd = -1; in update_fabric_wwn_list()
255 close(fd); in update_fabric_wwn_list()
261 close(fd); in update_fabric_wwn_list()
267 close(fd); in update_fabric_wwn_list()
280 close(fd); in update_fabric_wwn_list()
290 close(fd); in update_fabric_wwn_list()
295 close(fd); in update_fabric_wwn_list()
[all …]
/illumos-gate/usr/src/cmd/cdrw/
H A Ddevice.c93 int fd; in get_device() local
128 if (fd < 0) { in get_device()
139 dev->d_fd = fd; in get_device()
452 int fd; in lookup_device() local
458 (void) close(fd); in lookup_device()
479 (void) close(fd); in lookup_device()
495 (void) close(fd); in lookup_device()
514 int fd; in is_cd() local
519 if (fd < 0) { in is_cd()
527 if (fd >= 0) { in is_cd()
[all …]
/illumos-gate/usr/src/cmd/lp/lib/users/
H A Dloadpri.c81 int fd; in ld_priority_file() local
83 if ((fd = open_locked(path, "r", 0)) < 0) { in ld_priority_file()
105 if (!(p = fdgets(line, BUFSIZ, fd))) in ld_priority_file()
130 if (!(user = next_user(fd, line, &p))) in ld_priority_file()
136 if (!(user = next_user(fd, line, &p))) goto Error; in ld_priority_file()
142 close(fd); in ld_priority_file()
151 while ((user = next_user(fd, line, &p))); in ld_priority_file()
161 close(fd); in ld_priority_file()
195 char * next_user (int fd, char * buf, char ** pp ) in next_user() argument
229 while (*pp = fdgets(buf, BUFSIZ, fd)); in next_user()
/illumos-gate/usr/src/cmd/svc/configd/
H A Dmaindoor.c58 int fd; in main_switcher() local
110 fd = -1; in main_switcher()
112 arg_size, &fd); in main_switcher()
114 assert(fd == -1); in main_switcher()
117 assert(fd != -1); in main_switcher()
119 reply_desc.d_data.d_desc.d_descriptor = fd; in main_switcher()
143 int fd; in setup_main_door() local
170 fd = open(doorpath, O_RDWR | O_CREAT | O_EXCL, 0644); in setup_main_door()
173 if (fd >= 0) in setup_main_door()
174 (void) close(fd); in setup_main_door()

12345678910>>...84