/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | posix_fallocate.c | 39 fallocate_errno(int fd) argument 44 if (fstat64(fd, &statb) != 0) /* can't happen? */ 57 posix_fallocate(int fd, off_t offset, off_t len) argument 70 if (fcntl(fd, F_ALLOCSP, &lck) == -1) { 72 error = fallocate_errno(fd); 83 posix_fallocate64(int fd, off64_t offset, off64_t len) argument 96 if (fcntl(fd, F_ALLOCSP64, &lck) == -1) { 98 error = fallocate_errno(fd);
|
H A D | tcgetsid.c | 41 tcgetsid(int fd) argument 45 if ((ioctl(fd, TIOCGSID, &ttysid)) < 0 ||
|
H A D | truncate.c | 78 int fd; local 85 if ((fd = open(path, O_WRONLY)) == -1 || ftruncate(fd, len) == -1) 87 if (fd >= 0) 88 (void) close(fd);
|
/illumos-gate/usr/src/lib/libc/port/stdio/ |
H A D | _findbuf.c | 54 int fd = GET_FD(iop); local 66 if (fd < _NFILE) 67 buf = _smbuf[fd]; 73 else if (fd < 2 && (tty = isatty(fd))) { 74 buf = (fd == 0) ? _sibuf : _sobuf; /* special buffer */ 85 if (fstat64(fd, &stbuf) == 0 && stbuf.st_blksize > 0) 100 if (!(iop->_flag & _IONBF) && ((tty != -1) ? tty : isatty(fd)))
|
/illumos-gate/usr/src/cmd/hal/probing/acpi/ |
H A D | probe-acpi.c | 35 int fd = -1; local 57 if ((fd = open(device_file, O_RDONLY | O_NONBLOCK)) < 0) { 62 ac_adapter_update(ctx, udi, fd); 64 battery_update(ctx, udi, fd); 66 lid_update(ctx, udi, fd); 68 laptop_panel_update(ctx, udi, fd); 74 if (fd >= 0) { 75 close(fd);
|
/illumos-gate/usr/src/lib/libaio/common/ |
H A D | llib-laio | 34 int aioread(int fd, caddr_t buf, int bufsz, off_t offset, int whence, 36 int aiowrite(int fd, caddr_t buf, int bufsz, off_t offset, int whence, 39 int aioread64(int fd, caddr_t buf, int bufsz, off64_t offset, int whence, 41 int aiowrite64(int fd, caddr_t buf, int bufsz, off64_t offset, int whence,
|
/illumos-gate/usr/src/cmd/lp/lib/forms/ |
H A D | putform.c | 53 int fd; local 93 if ((fd = open_locked(path, "w", MODE_READ)) < 0) { 99 if (wrform(name, formp, fd, 0, (int *)0) == -1) { 100 close(fd); 103 close(fd); 130 if ((fd = open_locked(path, "w", MODE_READ)) < 0) { 137 write (fd, buf, n); 139 close(fd);
|
/illumos-gate/usr/src/cmd/lp/lib/users/ |
H A D | usermgmt.c | 46 int fd; local 60 if ((fd = open_locked(Lp_Users, "w", LPU_MODE)) < 0) 62 output_tbl(fd, ppri_tbl); 63 close(fd); 99 int fd; local 111 if ((fd = open_locked(Lp_Users, "w", LPU_MODE)) < 0) 114 output_tbl(fd, ppri_tbl); 115 close(fd);
|
/illumos-gate/usr/src/lib/libcontract/common/ |
H A D | device.c | 45 ct_dev_tmpl_set_minor(int fd, char *minor) argument 47 return (ct_tmpl_set_internal_string(fd, CTDP_MINOR, minor)); 51 ct_dev_tmpl_set_aset(int fd, uint_t aset) argument 53 return (ct_tmpl_set_internal(fd, CTDP_ACCEPT, aset)); 57 ct_dev_tmpl_set_noneg(int fd) argument 59 return (ct_tmpl_set_internal(fd, CTDP_NONEG, CTDP_NONEG_SET)); 63 ct_dev_tmpl_clear_noneg(int fd) argument 65 return (ct_tmpl_set_internal(fd, CTDP_NONEG, CTDP_NONEG_CLEAR)); 69 ct_dev_tmpl_get_minor(int fd, char *buf, size_t *buflenp) argument 71 int ret = ct_tmpl_get_internal_string(fd, CTDP_MINO 85 ct_dev_tmpl_get_aset(int fd, uint_t *aset) argument 91 ct_dev_tmpl_get_noneg(int fd, uint_t *negp) argument [all...] |
/illumos-gate/usr/src/lib/libnsl/rpc/ |
H A D | fdsync.c | 54 int end; /* fd of last lock in the list */ 62 static mutex_t *search(const void *handle, int fd); 63 static rpcfd_block_t *create_block(const void *handle, int fd); 87 rpc_fd_lock(const void *handle, int fd) argument 94 mp = search(handle, fd); 96 p = create_block(handle, fd); 98 mp = &p->lock[fd % CELLTBLSZ]; 108 rpc_fd_unlock(const void *handle, int fd) argument 113 mp = search(handle, fd); 121 create_block(const void *handle, int fd) argument 157 search(const void *handle, int fd) argument [all...] |
/illumos-gate/usr/src/cmd/lp/lib/msgs/ |
H A D | mconnect.c | 65 int fd; local 97 if ((fd = Open(path, O_RDWR, 0)) == -1) 98 if ((fd = Open(path, O_WRONLY, 0)) == -1) 103 if (isastream(fd) && !wronly) 111 if (ioctl(fd, I_SENDFD, fds[1]) != 0) 114 (void)_Close(fd); 116 fd = fds[0]; 129 md->readfd = fd; 133 md->writefd = fd; 174 int fd; local [all...] |
/illumos-gate/usr/src/cmd/boot/mbr/ |
H A D | mbr.c | 55 int c, fd, i, sol_part = -1; local 91 fd = open(mboot_file, O_RDONLY); 92 if (fd == -1 || read(fd, new_mboot, SECTOR_SIZE) != SECTOR_SIZE) { 94 if (fd == -1) 100 close(fd); 106 fd = open(device, O_RDWR); 107 if (fd == -1 || read(fd, boot_sect, SECTOR_SIZE) != SECTOR_SIZE) { 109 if (fd [all...] |
/illumos-gate/usr/src/lib/libproc/common/ |
H A D | proc_arg.c | 51 int fd; local 63 * Attempt to open the psinfo file, and return the fd if we can 66 if ((fd = open64(path, O_RDONLY)) >= 0) { 67 if (fstat64(fd, &st) != 0 || !S_ISREG(st.st_mode) || 69 (void) close(fd); 70 fd = -1; 75 return (fd); 87 int fd; local 91 * Attempt to open the core file, and return the fd if we can confirm 94 if ((fd 135 int fd; local 439 int fd, i; local [all...] |
H A D | proc_stdio.c | 48 int fd; local 62 if ((fd = mkstemp(stdout_name)) < 0) { 70 if (dup2(fd, 1) < 0) { 71 (void) close(fd); 77 (void) close(fd); 80 if ((fd = mkstemp(stderr_name)) < 0) { 89 if (dup2(fd, 2) < 0) { 90 (void) close(fd); 95 (void) close(fd); 99 (void) close(fd); [all...] |
/illumos-gate/usr/src/lib/librsm/inc/ |
H A D | rsmlib_in.h | 61 /* least significant 3 bytes of the fd should be unique enough */ 62 #define RSM_POLLFD_HASH(fd) (((fd) ^ ((fd) >> 8) ^ ((fd) >> 16)) % \ 66 * pollfd_table maintains a mapping from fd to resource number. It also 67 * provides a mechanism to check if a given fd corresponds to an rsmapi 72 int fd; member in struct:__anon3901
|
/illumos-gate/usr/src/lib/libbc/libc/gen/common/ |
H A D | ttyslot.c | 54 int fd; local 67 if ((fd = _syscall(SYS_openat, 74 while (_read(fd, &utx, sizeof (struct utmpx)) > 0) { 77 _syscall(SYS_close, fd); 81 _syscall(SYS_close, fd);
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | chmod.c | 35 fchmodat(int fd, const char *path, mode_t mode, int flag) argument 37 return (syscall(SYS_fchmodat, fd, path, mode, flag)); 53 fchmod(int fd, mode_t mode) argument 56 return (syscall(SYS_fchmod, fd, mode)); 58 return (fchmodat(fd, NULL, mode, 0));
|
H A D | stat.c | 37 fstatat64(int fd, const char *name, struct stat64 *sb, int flags) argument 39 return (syscall(SYS_fstatat64, fd, name, sb, flags)); 66 fstat64(int fd, struct stat64 *sb) argument 69 return (syscall(SYS_fstat64, fd, sb)); 71 return (fstatat64(fd, NULL, sb, 0)); 79 fstatat(int fd, const char *name, struct stat *sb, int flags) argument 81 return (syscall(SYS_fstatat, fd, name, sb, flags)); 108 fstat(int fd, struct stat *sb) argument 111 return (syscall(SYS_fstat, fd, sb)); 113 return (fstatat(fd, NUL [all...] |
/illumos-gate/usr/src/cmd/hal/tools/sunos/ |
H A D | hal-system-lcd-get-brightness-sunos.c | 34 int fd = -1; local 49 if ((fd = open(device_file, O_RDONLY | O_NONBLOCK)) < 0) { 56 if (ioctl(fd, ACPI_DRV_IOC_STATUS, &status) < 0) { 57 close(fd); 60 close(fd);
|
H A D | hal-system-lcd-set-brightness-sunos.c | 35 int fd = -1; local 50 if ((fd = open(device_file, O_RDONLY | O_NONBLOCK)) < 0) { 58 if (ioctl(fd, ACPI_DRV_IOC_SET_BRIGHTNESS, &level) < 0) { 59 close(fd); 62 close(fd);
|
/illumos-gate/usr/src/cmd/ttymon/ |
H A D | tmterm.c | 54 * fd - fd for the device 66 set_termio(fd,options,aspeed,clear,mode) 67 int fd; 92 if ((term = get_ttymode(fd, &termio, &termios, &stermio, 129 if (set_ttymode(fd, term, &termio, &termios, &stermio, 143 turnon_canon(fd) 144 int fd; 151 if (ioctl(fd, TCGETA, &termio) != 0) { 152 log("turnon_canon: TCGETA failed, fd 189 push_linedisc( int fd, char *modules, char *device) argument 225 hang_up_line(int fd) argument [all...] |
/illumos-gate/usr/src/lib/libnsctl/common/ |
H A D | llib-lnsctl | 36 int nsc_close(nsc_fd_t *fd); 37 int nsc_fileno(nsc_fd_t *fd); 38 int nsc_reserve(nsc_fd_t *fd); 39 int nsc_release(nsc_fd_t *fd); 40 int nsc_partsize(nsc_fd_t *fd, nsc_size_t *size);
|
/illumos-gate/usr/src/boot/sys/boot/i386/loader/ |
H A D | chain.c | 45 int fd, len, size = SECTOR_SIZE; local 60 fd = open(argv[1], O_RDONLY); 61 if (fd == -1) { 68 if (fstat(fd, &st) == -1) { 70 close(fd); 76 close(fd); 83 close(fd); 87 if (archsw.arch_readin(fd, mem, size) != size) { 89 close(fd); 92 close(fd); [all...] |
/illumos-gate/usr/src/common/secflags/ |
H A D | secflags.c | 185 struct flagdesc *fd; local 187 for (fd = flagdescs; fd->name != NULL; fd++) { 188 if (strcasecmp(str, fd->name) == 0) { 189 *ret = fd->value; 200 struct flagdesc *fd; local 202 for (fd = flagdescs; fd->name != NULL; fd 213 struct flagdesc *fd; local [all...] |
/illumos-gate/usr/src/cmd/avs/sdbc/ |
H A D | sdbc_ioctl.c | 54 int fd; local 56 fd = open("/dev/nsctl", O_RDONLY); 57 if (fd >= 0) 58 (void) close(fd); 60 fd = open(__sdbc_dev, O_RDONLY); 61 if (fd < 0) 64 return (__sdbc_fd = fd); 74 static int fd = -1; local 76 if (fd < 0) 77 fd [all...] |