Searched refs:fd (Results 51 - 75 of 1995) sorted by relevance

1234567891011>>

/illumos-gate/usr/src/lib/libcurses/screen/
H A Dtypeahead.c49 * Set the file descriptor for typeahead checks to fd. fd can be -1
54 typeahead(int fd) argument
103 * cur_term->_check_fd = (tty = ttyname(fd)) ?
106 if (isatty(fd)) {
116 if (isatty(fd))
117 cur_term->_check_fd = fd;
/illumos-gate/usr/src/lib/libresolv2/common/isc/
H A Dev_files.c42 static evFile *FindFD(const evContext_p *ctx, int fd, int eventmask);
46 int fd,
57 "evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n",
58 ctx, fd, eventmask, func, uap);
62 if (fd > ctx->highestFD)
65 OK(mode = fcntl(fd, F_GETFL, NULL)); /*%< side effect: validate fd. */
74 if (fd >= ctx->maxnfds && evPollfdRealloc(ctx, 1, fd) != 0)
77 id = FindFD(ctx, fd, EV_MASK_AL
45 evSelectFD(evContext opaqueCtx, int fd, int eventmask, evFileFunc func, void *uap, evFileID *opaqueID ) argument
268 FindFD(const evContext_p *ctx, int fd, int eventmask) argument
[all...]
/illumos-gate/usr/src/cmd/sgs/libelf/common/
H A Drawput.c47 _elf_read(int fd, off_t off, size_t fsz) argument
54 if (fd == -1) {
59 if (lseek(fd, off, 0) != off) {
68 if (read(fd, p, fsz) != fsz) {
/illumos-gate/usr/src/cmd/hal/utils/
H A Dacpi.h21 gboolean battery_update(LibHalContext *ctx, const char *udi, int fd);
22 gboolean ac_adapter_update(LibHalContext *ctx, const char *udi, int fd);
23 gboolean lid_update(LibHalContext *ctx, const char *udi, int fd);
24 gboolean laptop_panel_update(LibHalContext *ctx, const char *udi, int fd);
H A Dcdutils.h42 int uscsi(int fd, struct uscsi_cmd *scmd);
43 int mode_sense(int fd, uchar_t pc, int dbd, int page_len,
45 int get_mode_page(int fd, int page_no, int pc, int buf_len,
47 int get_configuration(int fd, uint16_t feature, int bufsize,
49 boolean_t get_current_profile(int fd, int *profile);
50 void walk_profiles(int fd, int (*f)(void *, int, boolean_t), void *);
51 void get_read_write_speeds(int fd, int *read_speed, int *write_speed,
53 boolean_t get_disc_info(int fd, disc_info_t *);
54 boolean_t read_format_capacity(int fd, uint64_t *capacity);
55 boolean_t get_media_info(int fd, struc
[all...]
/illumos-gate/usr/src/lib/libast/common/comp/
H A Dfsync.c39 fsync(int fd)
41 NoP(fd);
H A Dcloselog.c40 if (log.fd >= 0)
42 close(log.fd);
43 log.fd = -1;
H A Dreadlink.c43 int fd;
48 if ((fd = open(path, O_RDONLY)) < 0)
50 if (read(fd, buf, sizeof(FAKELINK_MAGIC)) == sizeof(FAKELINK_MAGIC) && !strcmp(buf, FAKELINK_MAGIC) && (n = read(fd, buf, siz)) > 0 && !buf[n - 1])
52 close(fd);
55 close(fd);
/illumos-gate/usr/src/boot/lib/libstand/
H A Dioctl.c69 ioctl(fd, cmd, arg)
70 int fd;
74 struct open_file *f = &files[fd];
76 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
/illumos-gate/usr/src/uts/common/avs/ns/nsctl/
H A Dnsc_resv.c82 * nsc_attach (nsc_fd_t *fd, int flag)
97 nsc_attach(fd, flag)
98 nsc_fd_t *fd;
103 rc = nsc_reserve(fd, flag);
106 nsc_release(fd);
114 * nsc_reserve (nsc_fd_t *fd, int flag)
144 nsc_reserve(fd, flag)
145 nsc_fd_t *fd;
148 nsc_dev_t *dev = fd->sf_dev;
152 flag |= (fd
267 nsc_waiting(nsc_fd_t *fd) argument
638 _nsc_fd_fn(nsc_fd_t *fd, int (*fn)(), int a, int flag) argument
744 nsc_fd_t *fd; local
[all...]
/illumos-gate/usr/src/lib/libproc/common/
H A Dproc_get_info.c57 int fd; local
64 if ((fd = open(fname, O_RDONLY)) >= 0) {
65 if (read(fd, credp, size) >= minsize)
67 (void) close(fd);
76 int fd; local
84 if ((fd = open(fname, O_RDONLY)) >= 0) {
85 if (read(fd, *psf, sizeof (prsecflags_t)) ==
88 (void) close(fd);
106 int fd; local
112 if ((fd
135 int fd; local
168 int fd; local
185 int fd; local
208 int fd; local
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dsafechown.c26 int fd; local
30 if ((fd = open(src, O_RDONLY, 0)) == -1)
33 if (fstat(fd, &fdbuf)) {
34 close(fd);
40 close(fd);
45 close(fd);
53 close(fd);
58 if (fchown(fd, uid, gid)) {
59 close(fd);
64 if (fchmod(fd, (mode_
[all...]
/illumos-gate/usr/src/lib/libbc/libc/gen/common/
H A Dclosedir.c39 int fd; local
43 fd = dirp->dd_fd;
48 return (close(fd));
H A Dmkstemp.c16 int fd, i; local
29 while ((fd = open(as, O_CREAT|O_EXCL|O_RDWR, 0600)) == -1) {
34 return (fd);
/illumos-gate/usr/src/lib/libbc/libc/sys/common/
H A Ddup.c31 dup(int fd) argument
35 if ((ret = _syscall(SYS_fcntl, fd, F_DUPFD, 0)) == -1)
38 if ((fds = fd_get(fd)) != -1)
H A Dfdlist.c34 int fd[NUM_FD]; /* list of 16 descriptors */ member in struct:fd_lst
49 lst->fd[i] = -1;
58 fd_add(int fd, int fds) argument
67 if (fdc->fd[i] == -1) {
68 fdc->fd[i] = fd;
89 fdtail->fd[0] = fd;
96 fd_rem(int fd) argument
103 if (fdc->fd[
116 fd_get(int fd) argument
[all...]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dtcgetpgrp.c40 tcgetpgrp(int fd) argument
44 if (tcgetsid(fd) < 0 || ioctl(fd, TIOCGPGRP, &pgrp) < 0)
H A Dtcsetpgrp.c40 tcsetpgrp(int fd, pid_t pgrp) argument
42 if (tcgetsid(fd) < 0)
44 return (ioctl(fd, TIOCSPGRP, &pgrp));
/illumos-gate/usr/src/stand/lib/fs/common/
H A Dpromfs.c41 static int promfs_close(int fd);
42 static ssize_t promfs_read(int fd, caddr_t buf, size_t size);
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) argument
87 prom_fclose(fsih, fd);
92 promfs_read(int fd, caddr_t buf, size_t size) argument
94 return (prom_fread(fsih, fd, buf, size));
99 promfs_lseek(int fd, off_t offset, int whence) argument
101 return (prom_fseek(fsih, fd, offse
105 promfs_fstat(int fd, struct bootstat *stp) argument
[all...]
/illumos-gate/usr/src/cmd/lp/lib/filters/
H A Dfiltertable.c70 int fd; local
79 fd = open_locked(file, mode, MODE_READ);
84 return (fd);
H A Ddumpfilters.c60 int fd; local
62 if ((fd = open_filtertable(file, "w")) < 0)
76 (void)fdprintf (fd, "%s%s", FL_SEP, p);
82 String: (void)fdprintf (fd, "%s%s", FL_SEP, (p? p : ""));
85 (void)fdprintf(fd, "%s%s", FL_SEP,
96 Types: (void)fdprintf(fd, "%s", FL_SEP);
100 (void)fdprintf(fd, "%s%s", sep,
105 (void)fdprintf(fd, "%s", NAME_ANY);
108 (void)fdprintf(fd, "%s", FL_SEP);
110 fdprintlist (fd, p
140 q_print(int fd, char *str) argument
[all...]
/illumos-gate/usr/src/lib/libnsl/common/
H A Ddaemon_utils.c64 int fd, err; local
67 if ((fd = open_daemon_lock(name, O_RDONLY)) == -1) {
78 err = fcntl(fd, F_GETLK, &lock);
79 (void) close(fd);
91 int fd; local
124 if ((fd = open(lock_file, mode, 0644)) == -1)
128 (void) fchmod(fd, 0644);
130 return (fd);
141 int fd; local
149 if ((fd
177 int fd = open_daemon_lock(name, O_CREAT); local
[all...]
/illumos-gate/usr/src/lib/libresolv2/common/bsd/
H A Dftruncate.c32 __ftruncate(int fd, long wantsize) { argument
36 if ((cursize = lseek(fd, 0L, 2)) == -1)
41 if (lseek(fd, wantsize - 1, 0) == -1 ||
42 write(fd, "", 1) == -1) {
56 return (fcntl(fd, F_FREESP, &fl));
/illumos-gate/usr/src/cmd/rcap/common/
H A Drcapd_stat.c42 int fd; local
47 if ((fd = open(file, O_RDONLY)) < 0)
50 if (read(fd, &hdr, sizeof (hdr)) != sizeof (hdr)) {
51 (void) close(fd);
54 (void) close(fd);
/illumos-gate/usr/src/lib/libast/common/vec/
H A Dvecfile.c44 int fd; local
48 if ((fd = open(file, O_RDONLY)) >= 0)
50 if (!fstat(fd, &st) && S_ISREG(st.st_mode) && (n = st.st_size) > 0 && (buf = newof(0, char, n + 1, 0)))
52 if (read(fd, buf, n) == n)
59 close(fd);

Completed in 147 milliseconds

1234567891011>>