Searched defs:fd (Results 1 - 25 of 1651) 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 Dgets.c86 fgetstr(char *buf, int size, int fd) argument
94 err = read(fd, &c, sizeof(c));
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 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);
/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 */
/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);
H A Dcommands.c64 help_getnext(int fd, char **topic, char **subtopic, char **desc) argument
69 if (fgetstr(line, 80, fd) < 0)
H A Dinstall.c105 read_metatags(int fd) argument
112 fsize = read(fd, buf, sizeof(buf));
191 int error, fd, i, local; local
261 fd = open("/metatags", O_RDONLY);
262 if (fd != -1) {
263 error = read_metatags(fd);
264 close(fd);
H A Dinterp.c190 int prevsrcid, fd, line; local
193 if (((fd = open(filename, O_RDONLY)) == -1)) {
204 while (fgetstr(input, sizeof(input), fd) >= 0) {
224 close(fd);
238 close(fd);
245 bf_vm->sourceId.i = fd+1; /* 0 is user input device */
H A Dinterp_forth.c258 int fd, rv; local
317 fd = open(rc, O_RDONLY);
318 if (fd != -1) {
319 (void)ficlExecFD(bf_vm, fd);
320 close(fd);
H A Dload_elf.c68 int fd; member in struct:elf_file
101 if ((ef->fd = open(filename, O_RDONLY)) == -1)
105 close(ef->fd);
108 bytes_read = read(ef->fd, ef->firstpage, PAGE_SIZE);
137 if (ef->fd != -1) {
138 close(ef->fd);
139 ef->fd = -1;
166 ef.fd = -1;
286 if (ef.fd != -1)
287 close(ef.fd);
[all...]
H A Dload_elf_obj.c61 int fd; member in struct:elf_file
101 if ((ef.fd = open(filename, O_RDONLY)) == -1)
105 bytes_read = read(ef.fd, hdr, sizeof(*hdr));
177 close(ef.fd);
185 * With the file (fd) open on the image, and (ehdr) containing
203 shdr = alloc_pread(ef->fd, (off_t)hdr->e_shoff, shdrbytes);
317 if (kern_pread(ef->fd, (vm_offset_t)cshdr->sh_addr,
H A Dls.c61 int fd; local
70 fd = -1;
106 fd = ls_getdir(&path);
107 if (fd == -1) {
115 while ((d = readdirfd(fd)) != NULL) {
142 if (fd != -1)
143 close(fd);
150 * Given (path) containing a vaguely reasonable path specification, return an fd
157 int fd; local
161 fd
[all...]
H A Dmisc.c119 kern_pread(int fd, vm_offset_t dest, size_t len, off_t off) argument
122 if (lseek(fd, off, SEEK_SET) == -1) {
128 if ((size_t)archsw.arch_readin(fd, dest, len) != len) {
142 alloc_pread(int fd, off_t off, size_t len) argument
153 if (lseek(fd, off, SEEK_SET) == -1) {
160 if ((size_t)read(fd, buf, len) != len) {
H A Dmodule.c411 int fd, got; local
428 if ((fd = open(name, O_RDONLY)) < 0) {
442 got = archsw.arch_readin(fd, laddr, 4096);
449 close(fd);
471 close(fd);
972 int fd, size, version; local
979 st.st_size > LINKER_HINTS_MAX || (fd = open(path, O_RDONLY)) < 0) {
985 size = read(fd, &version, sizeof(version));
992 if (read(fd, mdp->d_hints, size) != size)
995 close(fd);
[all...]
/illumos-gate/usr/src/boot/sys/boot/efi/loader/arch/i386/
H A Di386_copy.c56 i386_readin(const int fd, vm_offset_t dest, const size_t len) argument
58 return (read(fd, PTOV(dest), len));

Completed in 125 milliseconds

1234567891011>>