Searched refs:fd (Results 1 - 25 of 1995) sorted by path

1234567891011>>

/illumos-gate/usr/src/boot/lib/libstand/
H A Dclose.c69 close(int fd) argument
71 struct open_file *f = &files[fd];
74 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
H A Ddosfs.c45 static int dos_open(const char *path, struct open_file *fd);
46 static int dos_close(struct open_file *fd);
47 static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid);
48 static off_t dos_seek(struct open_file *fd, off_t offset, int whence);
49 static int dos_stat(struct open_file *fd, struct stat *sb);
50 static int dos_readdir(struct open_file *fd, struct dirent *d);
160 dos_read_fat(DOS_FS *fs, struct open_file *fd) argument
162 struct devdesc *dd = fd->f_devdata;
175 if (ioget(fd, fs->lsnfat, 0, fat.buf, secbyt(fs->spf)) == 0) {
192 dos_mount(DOS_FS *fs, struct open_file *fd) argument
254 dos_open(const char *path, struct open_file *fd) argument
295 dos_read(struct open_file *fd, void *buf, size_t nbyte, size_t *resid) argument
354 dos_seek(struct open_file *fd, off_t offset, int whence) argument
389 dos_close(struct open_file *fd) argument
404 dos_stat(struct open_file *fd, struct stat *sb) argument
436 dos_readdir(struct open_file *fd, struct dirent *d) argument
860 ioget(struct open_file *fd, daddr_t lsec, size_t offset, void *buf, u_int size) argument
[all...]
H A Ddosfs.h98 struct open_file *fd; /* file descriptor */ member in struct:__anon63
H A Dfstat.c40 fstat(fd, sb)
41 int fd;
44 struct open_file *f = &files[fd];
46 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
H A Dgets.c86 fgetstr(char *buf, int size, int fd) argument
94 err = read(fd, &c, sizeof(c));
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) {
H A Dlseek.c69 lseek(int fd, off_t offset, int where) argument
72 struct open_file *f = &files[fd];
74 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
H A Dnetif.c295 int fd; local
300 for (fd = 0, s = sockets; fd < SOPEN_MAX; fd++, s++)
320 return(fd);
H A Dopen.c75 int fd; local
77 for (fd = 0; fd < SOPEN_MAX; fd++)
78 if (files[fd].f_flags == 0)
79 return(fd);
96 int fd, i, error, besterror; local
99 if ((fd = o_gethandle()) == -1) {
104 f = &files[fd];
129 return (fd);
[all...]
H A Dpager.c128 * Display from (fd).
135 int fd; local
138 if ((fd = open(fname, O_RDONLY)) == -1) {
144 hmuch = read(fd, buf, sizeof(buf) - 1);
159 close(fd);
H A Dpkgfs.c164 int error, fd; local
171 fd = open(pkgname, O_RDONLY);
175 if (fd == -1)
178 error = new_package(fd, &pkg);
180 close(fd);
614 new_package(int fd, struct package **pp) argument
625 pkg->pkg_fd = fd;
H A Dread.c70 read(int fd, void *dest, size_t bcount) argument
72 struct open_file *f = &files[fd];
75 if ((unsigned)fd >= SOPEN_MAX || !(f->f_flags & F_READ)) {
H A Dreaddir.c34 readdirfd(int fd) argument
37 struct open_file *f = &files[fd];
39 if ((unsigned)fd >= SOPEN_MAX || !(f->f_flags & F_READ)) {
H A Dsplitfs.c183 int fd; local
187 fd = sf->curfd;
189 return(close(fd));
H A Dstand.h271 extern int fgetstr(char *buf, int size, int fd);
H A Dstat.c44 int fd, rv; local
46 fd = open(str, O_RDONLY);
47 if (fd < 0)
49 rv = fstat(fd, sb);
50 (void)close(fd);
H A Dwrite.c70 write(fd, dest, bcount)
71 int fd;
75 struct open_file *f = &files[fd];
78 if ((unsigned)fd >= SOPEN_MAX || !(f->f_flags & F_WRITE)) {
/illumos-gate/usr/src/boot/lib/libz/
H A Dgzguts.h169 int fd; /* file descriptor */ member in struct:__anon107
170 char *path; /* path or fd for error messages */
H A Dgzlib.c94 local gzFile gz_open(path, fd, mode)
96 int fd;
195 if (fd == -2) {
209 if (fd == -2)
243 /* open the file with the appropriate flags (or just use fd) */
244 state->fd = fd > -1 ? fd : (
246 fd == -2 ? _wopen(path, oflag, 0666) :
249 if (state->fd
[all...]
H A Dgzread.c20 state->fd, and update state->eof, state->err, and state->msg as appropriate.
33 ret = read(state->fd, buf + *have, len - *have);
594 ret = close(state->fd);
H A Dgzwrite.c87 got = write(state->fd, strm->next_in, strm->avail_in);
104 if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
576 if (close(state->fd) == -1)
H A Dzlib.h1264 ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
1266 gzdopen associates a gzFile with the file descriptor fd. File descriptors
1271 descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
1272 fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
1274 gzdopen does not close fd if it fails. If you are using fileno() to get the
1282 provided, or '+' was provided), or if fd i
[all...]
H A Dzutil.h128 # define fdopen(fd,mode) NULL /* No fdopen() */
149 # define fdopen(fd,mode) NULL /* No fdopen() */
154 # define fdopen(fd,mode) NULL /* No fdopen() */
160 # define fdopen(fd,type) _fdopen(fd,type)
/illumos-gate/usr/src/boot/lib/libz/test/
H A Dminigzip.c189 gzFile gzdopen(fd, mode)
190 int fd;
193 return gz_open(NULL, fd, mode);
196 gzFile gz_open(path, fd, mode)
198 int fd;
222 gz->file = path == NULL ? fdopen(fd, gz->write ? "wb" : "rb") :
/illumos-gate/usr/src/boot/sys/boot/common/
H A Dboot.c299 int fd, error; local
306 if ((fd = open(lbuf, O_RDONLY)) < 0)
310 while (fgetstr(lbuf, sizeof(lbuf), fd) >= 0) {
369 close(fd);

Completed in 209 milliseconds

1234567891011>>