Home | History | Annotate | Download | only in bootst

Lines Matching defs:fs

59 	struct file *fs;
65 fs = alloc(sizeof(struct file));
66 fs->fs_nextblk = 0;
67 fs->fs_curblk = -1;
68 fs->fs_len = 0;
69 fs->fs_ptr = fs->fs_buf;
71 f->f_fsdata = fs;
77 struct file *fs;
79 fs = (struct file *)f->f_fsdata;
82 if (fs != NULL)
83 dealloc(fs, sizeof(*fs));
90 struct file *fs = (struct file *)f->f_fsdata;
97 if (fs->fs_len == 0)
101 if (fs->fs_len <= 0)
105 if (csize > fs->fs_len)
106 csize = fs->fs_len;
108 memcpy(addr, fs->fs_ptr, csize);
109 fs->fs_ptr += csize;
110 fs->fs_len -= csize;
134 struct file *fs = (struct file *)f->f_fsdata;
147 curblk = (fs->fs_curblk < 0) ? 0 : fs->fs_curblk;
159 if (fs->fs_curblk < 0)
162 newoff = fs->fs_curblk * RAWFS_BSIZE;
163 newoff += RAWFS_BSIZE - fs->fs_len;
184 while (fs->fs_curblk != targblk && (err = rawfs_get_block(f)) == 0)
196 fs->fs_len = RAWFS_BSIZE - idx;
197 fs->fs_ptr = &fs->fs_buf[idx];
217 struct file *fs;
221 fs = (struct file *)f->f_fsdata;
222 fs->fs_ptr = fs->fs_buf;
226 fs->fs_nextblk * (RAWFS_BSIZE / DEV_BSIZE),
227 RAWFS_BSIZE, fs->fs_buf, &len);
230 fs->fs_len = len;
231 fs->fs_curblk = fs->fs_nextblk;
232 fs->fs_nextblk += 1;