/illumos-gate/usr/src/uts/sparc/os/ |
H A D | bootops.c | 121 int fd = -1, layered; in bop_open() local 140 if (fd == -1) in bop_open() 144 prom_ihs[fd] = ih; in bop_open() 145 return (fd); in bop_open() 167 return (prom_fread(prom_ihs[fd], fd, buf, size)); in bop_read() 177 return (prom_fseek(prom_ihs[fd], fd, off)); in bop_seek() 184 bop_close(int fd) in bop_close() argument 187 prom_fclose(prom_ihs[fd], fd); in bop_close() 188 prom_ihs[fd] = 0; in bop_close() 502 return (prom_fsize(prom_ihs[fd], fd, (size_t *)&st->st_size)); in bop_fstat() [all …]
|
/illumos-gate/usr/src/lib/libdwarf/common/ |
H A D | dwarf_generic_init.c | 88 dwarf_init(int fd, in dwarf_init() argument 101 int fd = -1; in open_a_file() local 113 return fd; in open_a_file() 146 int fd = -1; in dwarf_init_path() local 170 if(fd == -1) { in dwarf_init_path() 182 close(fd); in dwarf_init_path() 186 dbg->de_fd = fd; in dwarf_init_path() 198 close(fd); in dwarf_init_path() 215 close(fd); in dwarf_init_path() 226 close(fd); in dwarf_init_path() [all …]
|
/illumos-gate/usr/src/common/secflags/ |
H A D | secflags.c | 185 struct flagdesc *fd; in secflag_by_name() local 187 for (fd = flagdescs; fd->name != NULL; fd++) { in secflag_by_name() 188 if (strcasecmp(str, fd->name) == 0) { in secflag_by_name() 189 *ret = fd->value; in secflag_by_name() 200 struct flagdesc *fd; in secflag_to_str() local 202 for (fd = flagdescs; fd->name != NULL; fd++) { in secflag_to_str() 203 if (sf == fd->value) in secflag_to_str() 204 return (fd->name); in secflag_to_str() 213 struct flagdesc *fd; in secflags_to_str() local 223 for (fd = flagdescs; fd->name != NULL; fd++) { in secflags_to_str() [all …]
|
/illumos-gate/usr/src/lib/libutempter/common/ |
H A D | utempter.c | 51 if (snprintf(ut.ut_id, sizeof (ut.ut_id), "f%d", fd) >= in utempter_update_utmpx() 72 char *line = ptsname(fd); in utempter_update_utmpx() 90 utempter_add_record(int fd, const char *host) in utempter_add_record() argument 92 utempter_update_utmpx(USER_PROCESS, fd, host); in utempter_add_record() 93 last_fd = fd; in utempter_add_record() 98 utempter_remove_record(int fd) in utempter_remove_record() argument 100 utempter_update_utmpx(DEAD_PROCESS, fd, NULL); in utempter_remove_record() 101 if (last_fd == fd) in utempter_remove_record() 119 (void) utempter_add_record(fd, host); in addToUtmp() 129 removeLineFromUtmp(const char *pty __unused, int fd) in removeLineFromUtmp() argument [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/port/ |
H A D | astwinsize.c | 72 astwinsize(int fd, register int* rows, register int* cols) in astwinsize() argument 78 if (!ttctl(fd, TIOCGWINSZ, &ws) && ws.ws_col > 0 && ws.ws_row > 0) in astwinsize() 100 if (!ttctl(fd, JWINSIZE, &ws) && ws.bytesx > 0 && ws.bytesy > 0) in astwinsize() 124 ttctl(register int fd, int op, void* tt) in ttctl() argument 128 if (fd < 0) in ttctl() 130 for (fd = 0; fd <= 2; fd++) in ttctl() 131 if (!ioctl(fd, op, tt)) return(0); in ttctl() 132 if ((fd = open("/dev/tty", O_RDONLY|O_cloexec)) >= 0) in ttctl() 134 v = ioctl(fd, op, tt); in ttctl() 135 close(fd); in ttctl() [all …]
|
/illumos-gate/usr/src/cmd/bhyve/test/tests/mevent/ |
H A D | vnode_file.c | 46 if (fstat(fd, &st) != 0) in callback() 59 test_fd(int fd, char *tag) in test_fd() argument 75 if (lseek(fd, -1, SEEK_CUR) == -1) in test_fd() 77 if (write(fd, "X", 1) == -1) in test_fd() 115 int fd; in main() local 124 fd = mkstemp(template); in main() 125 if (fd == -1) in main() 130 test_fd(fd, "temporary file"); in main() 136 fd = fileno(fp); in main() 137 if (fd == -1) in main() [all …]
|
/illumos-gate/usr/src/cmd/audio/utilities/ |
H A D | device_ctl.c | 48 audio_getinfo(int fd, Audio_info *ip) in audio_getinfo() argument 62 audio_setinfo(int fd, Audio_info *ip) in audio_setinfo() argument 97 err = audio_setinfo(fd, &info); in audio__setplayhdr() 99 err = audio_getinfo(fd, &info); in audio__setplayhdr() 195 err = audio_setinfo(fd, &info); in audio__setval() 197 err = audio_getinfo(fd, &info); in audio__setval() 228 err = audio__setval(fd, &x, which); in audio__setgain() 266 err = audio_setinfo(fd, &info); in audio__setpause() 282 audio__flush(int fd, unsigned int which) in audio__flush() argument 299 audio_drain(int fd, int sig) in audio_drain() argument [all …]
|
H A D | filehdr.c | 146 if (lseek(fd, offset, SEEK_SET) < 0) { in audio_rewrite_aiff_filesize() 158 if (lseek(fd, offset, SEEK_SET) < 0) { in audio_rewrite_aiff_filesize() 170 if (lseek(fd, offset, SEEK_SET) < 0) { in audio_rewrite_aiff_filesize() 270 fcntl_err = fcntl(fd, F_GETFL, 0); in audio_rewrite_filesize() 338 err = fstat(fd, &st); in audio_read_filehdr() 373 err = read(fd, infop, (int)isize); in audio_read_filehdr() 403 err = read(fd, junk, isize); in audio_read_filehdr() 428 int fd; in audio_isaudiofile() local 437 if (fd < 0) { in audio_isaudiofile() 456 (void) close(fd); in audio_isaudiofile() [all …]
|
/illumos-gate/usr/src/tools/btxld/ |
H A D | version.c | 48 int fd; in add_version() local 59 fd = open(ifile, O_RDONLY); in add_version() 60 if (fd == -1) { in add_version() 64 if (fstat(fd, &sb) == -1) { in add_version() 66 close(fd); in add_version() 77 close(fd); in add_version() 89 close(fd); in add_version() 92 close(fd); in add_version() 118 if (fd == -1) { in add_version() 123 ret = write(fd, buf, buf_size); in add_version() [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/secure/ |
H A D | secure.c | 52 int fd; in getsecure() local 76 fld < SC_MAX && fdgets(buf, BUFSIZ, fd); in getsecure() 115 close(fd); in getsecure() 119 close(fd); in getsecure() 149 int fd; in putsecure() local 181 (void)fdprintf(fd, "%u\n", secbufp->uid); in putsecure() 185 (void)fdprintf(fd, "%s\n", secbufp->user); in putsecure() 189 (void)fdprintf(fd, "%u\n", secbufp->gid); in putsecure() 214 (void) fdprintf(fd, "%s\n", in putsecure() 217 (void) fdprintf(fd, "none\n"); in putsecure() [all …]
|
/illumos-gate/usr/src/cmd/sendmail/db/db/ |
H A D | db_region.c | 61 infop->fd = -1; 131 if (infop->fd != -1) 153 if (infop->fd == -1) { 422 if (infop->fd != -1) { 423 (void)__os_close(infop->fd); 424 infop->fd = -1; 552 (void)__os_close(infop->fd); 553 infop->fd = -1; 592 int fd, ret, t_ret; local 676 (void)__os_close(fd); [all …]
|
/illumos-gate/usr/src/tools/smatch/src/smatch_scripts/implicit_dependencies/with_structs/ |
H A D | implicit_dependencies_verbose.pretty | 836 'reason': set([('fd', 'flags'), 851 'reason': set([('fd', 'flags'), 910 'reason': set([('fd', 'flags'), 1539 'reason': set([('fd', 'flags'), 1543 'reason': set([('fd', 'flags'), 1555 'reason': set([('fd', 'flags'), 1582 'reason': set([('fd', 'flags'), 1982 'reason': set([('fd', 'flags'), 16379 'reason': set([('fd', 'flags'), 16383 'reason': set([('fd', 'flags'), [all …]
|
/illumos-gate/usr/src/lib/libnsl/rpc/ |
H A D | fdsync.c | 85 rpc_fd_lock(const void *handle, int fd) in rpc_fd_lock() argument 92 mp = search(handle, fd); in rpc_fd_lock() 94 p = create_block(handle, fd); in rpc_fd_lock() 96 mp = &p->lock[fd % CELLTBLSZ]; in rpc_fd_lock() 106 rpc_fd_unlock(const void *handle, int fd) in rpc_fd_unlock() argument 111 mp = search(handle, fd); in rpc_fd_unlock() 119 create_block(const void *handle, int fd) in create_block() argument 137 if (fd < l->end) in create_block() 155 search(const void *handle, int fd) in search() argument 160 if (fd <= p->end) in search() [all …]
|
H A D | rpc_soc.c | 79 int fd = *sockp; in clnt_com_create() local 92 if (fd == RPC_ANYSOCK) { in clnt_com_create() 94 if (fd == -1) in clnt_com_create() 96 RPC_RAISEFD(fd); in clnt_com_create() 133 *sockp = fd; in clnt_com_create() 147 (void) t_close(fd); in clnt_com_create() 207 if (fd == -1) { in svc_com_create() 227 (void) t_close(fd); in svc_com_create() 257 svcudp_create(int fd) in svcudp_create() argument 517 int fd; in authdes_create() local [all …]
|
/illumos-gate/usr/src/lib/libcontract/common/ |
H A D | device.c | 43 ct_dev_tmpl_set_minor(int fd, char *minor) in ct_dev_tmpl_set_minor() argument 45 return (ct_tmpl_set_internal_string(fd, CTDP_MINOR, minor)); in ct_dev_tmpl_set_minor() 49 ct_dev_tmpl_set_aset(int fd, uint_t aset) in ct_dev_tmpl_set_aset() argument 51 return (ct_tmpl_set_internal(fd, CTDP_ACCEPT, aset)); in ct_dev_tmpl_set_aset() 55 ct_dev_tmpl_set_noneg(int fd) in ct_dev_tmpl_set_noneg() argument 61 ct_dev_tmpl_clear_noneg(int fd) in ct_dev_tmpl_clear_noneg() argument 67 ct_dev_tmpl_get_minor(int fd, char *buf, size_t *buflenp) in ct_dev_tmpl_get_minor() argument 83 ct_dev_tmpl_get_aset(int fd, uint_t *aset) in ct_dev_tmpl_get_aset() argument 85 return (ct_tmpl_get_internal(fd, CTDP_ACCEPT, aset)); in ct_dev_tmpl_get_aset() 89 ct_dev_tmpl_get_noneg(int fd, uint_t *negp) in ct_dev_tmpl_get_noneg() argument [all …]
|
/illumos-gate/usr/src/stand/lib/fs/common/ |
H A D | promfs.c | 41 static int promfs_close(int fd); 43 static off_t promfs_lseek(int fd, off_t offset, int whence); 44 static int promfs_fstat(int fd, struct bootstat *stp); 85 promfs_close(int fd) in promfs_close() argument 87 prom_fclose(fsih, fd); in promfs_close() 92 promfs_read(int fd, caddr_t buf, size_t size) in promfs_read() argument 94 return (prom_fread(fsih, fd, buf, size)); in promfs_read() 99 promfs_lseek(int fd, off_t offset, int whence) in promfs_lseek() argument 101 return (prom_fseek(fsih, fd, offset)); in promfs_lseek() 105 promfs_fstat(int fd, struct bootstat *stp) in promfs_fstat() argument [all …]
|
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | safechown.c | 24 int fd; in safechown() local 31 if (fstat(fd, &fdbuf)) { in safechown() 32 close(fd); in safechown() 38 close(fd); in safechown() 43 close(fd); in safechown() 51 close(fd); in safechown() 56 if (fchown(fd, uid, gid)) { in safechown() 57 close(fd); in safechown() 62 if (fchmod(fd, (mode_t)mode)) { in safechown() 63 close(fd); in safechown() [all …]
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | eventfd.c | 28 int fd; in eventfd() local 41 if ((fd = open("/dev/eventfd", oflags)) < 0) in eventfd() 45 ioctl(fd, EVENTFDIOC_SEMAPHORE, 0) != 0) { in eventfd() 46 (void) close(fd); in eventfd() 50 if (write(fd, &val, sizeof (val)) < sizeof (val)) { in eventfd() 51 (void) close(fd); in eventfd() 55 return (fd); in eventfd() 59 eventfd_read(int fd, eventfd_t *valp) in eventfd_read() argument 61 ssize_t ret = read(fd, valp, sizeof (*valp)); in eventfd_read() 68 eventfd_write(int fd, eventfd_t val) in eventfd_write() argument [all …]
|
/illumos-gate/usr/src/lib/libsun_ima/common/ |
H A D | ima.c | 267 int fd; in IMA_GetNodeProperties() local 322 int fd; in IMA_SetNodeName() local 352 int fd; in IMA_SetNodeAlias() local 416 int fd; in IMA_GetDiscoveryProperties() local 1166 int fd; in IMA_GetDiscoveryAddressProperties() local 1751 int fd; in IMA_LuInquiry() local 1842 int fd; in IMA_LuReadCapacity() local 1945 int fd; in IMA_LuReportLuns() local 2194 int fd; in IMA_GetInitiatorAuthParms() local 2249 int fd; in IMA_SetInitiatorAuthParms() local [all …]
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | pt.c | 77 ptsdev(int fd) in ptsdev() argument 87 if (ioctl(fd, I_STR, &istr) < 0 || fstat64(fd, &status) < 0) in ptsdev() 94 ptsname(int fd) in ptsname() argument 99 if ((dev = ptsdev(fd)) == NODEV) in ptsname() 123 unlockpt(int fd) in unlockpt() argument 132 if (ioctl(fd, I_STR, &istr) < 0) in unlockpt() 158 __unlockpt_xpg4(int fd) in __unlockpt_xpg4() argument 162 if ((ret = unlockpt(fd)) == 0) { in __unlockpt_xpg4() 178 grantpt(int fd) in grantpt() argument 185 if (ptsdev(fd) == NODEV) in grantpt() [all …]
|
H A D | nftw.c | 134 DIR *fd; member 189 this.fd = 0; in walk() 484 if (this.fd) in walk() 633 int fd; in nocdstat() local 640 fd = lp->fd->dd_fd; in nocdstat() 644 fd = AT_FDCWD; in nocdstat() 656 int fd; in nocdlstat() local 663 fd = lp->fd->dd_fd; in nocdlstat() 689 int fd, cfd; in nocdopendir() local 712 fd = cfd; in nocdopendir() [all …]
|
/illumos-gate/usr/src/stand/lib/fs/nfs/ |
H A D | nfsops.c | 69 static int boot_nfs_close(int fd); 130 get_filep(int fd) in get_filep() argument 135 if (fd == filep->desc) in get_filep() 227 boot_nfs_close(int fd) in boot_nfs_close() argument 235 if ((filep = get_filep(fd)) == 0) in boot_nfs_close() 260 if (fd == 0) { in boot_nfs_read() 275 if ((filep = get_filep(fd)) == 0) in boot_nfs_read() 316 if (fd == 0) { in boot_nfs_lseek() 321 if ((filep = get_filep(fd)) == 0) in boot_nfs_lseek() 380 if (fd == 0) { in boot_nfs_fstat() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/include/ |
H A D | terminal.h | 73 # define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty) argument 75 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty) argument 106 # define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty) argument 107 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty) argument 125 # define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty) argument 126 # define tcsetattr(fd,action,tty) ioctl(fd, action, tty) argument 128 # define tcgetattr(fd,tty) gtty(fd, tty) argument 129 # define tcsetattr(fd,action,tty) stty(fd, tty) argument
|
/illumos-gate/usr/src/cmd/hal/utils/ |
H A D | cdutils.h | 40 int uscsi(int fd, struct uscsi_cmd *scmd); 41 int mode_sense(int fd, uchar_t pc, int dbd, int page_len, 43 int get_mode_page(int fd, int page_no, int pc, int buf_len, 45 int get_configuration(int fd, uint16_t feature, int bufsize, 47 boolean_t get_current_profile(int fd, int *profile); 48 void walk_profiles(int fd, int (*f)(void *, int, boolean_t), void *); 51 boolean_t get_disc_info(int fd, disc_info_t *); 52 boolean_t read_format_capacity(int fd, uint64_t *capacity); 53 boolean_t get_media_info(int fd, struct dk_minfo *minfop); 54 boolean_t get_disc_capacity_for_profile(int fd, int profile, [all …]
|
/illumos-gate/usr/src/cmd/fs.d/pcfs/fsck/ |
H A D | clusters.c | 381 (void) close(fd); in writeCachedCluster() 648 summarizeFAT(int fd) in summarizeFAT() argument 665 getFAT(fd); in getReadyToSearch() 697 getReadyToSearch(fd); in summarize() 717 summarizeFAT(fd); in summarize() 810 (void) close(fd); in emergencyEndOfDirectory() 878 (void) close(fd); in createNewEndOfDirectory() 1168 linkOrphan(fd, c); in relinkCreatedOrphans() 1221 relinkOrphans(int fd) in relinkOrphans() argument 1224 relinkFATOrphans(fd); in relinkOrphans() [all …]
|