Lines Matching refs:fs
71 static errcode_t get_file(ext2_filsys fs, const char * filename,
85 retval = ext2fs_namei(fs, EXT2_ROOT_INO, EXT2_ROOT_INO,
90 retval = ext2fs_read_inode(fs, ino, &inode);
102 retval = ext2fs_file_open(fs, ino, 0, &e2_file);
236 static int parse_fstab_line(char *line, struct fs_info *fs)
271 fs->device = string_copy(device);
272 fs->mountpt = string_copy(mntpnt);
273 fs->type = string_copy(type);
274 fs->opts = string_copy(opts ? opts : "");
275 fs->freq = freq ? atoi(freq) : -1;
276 fs->passno = passno ? atoi(passno) : -1;
277 fs->flags = 0;
278 fs->next = NULL;
285 static void free_fstab_line(struct fs_info *fs)
287 if (fs->device)
288 fs->device = 0;
289 if (fs->mountpt)
290 fs->mountpt = 0;
291 if (fs->type)
292 fs->type = 0;
293 if (fs->opts)
294 fs->opts = 0;
295 memset(fs, 0, sizeof(struct fs_info));
335 static void get_root_type(ext2_filsys fs)
343 retval = get_file(fs, "/etc/fstab", &file);
372 ext2_filsys fs;
387 retval = ext2fs_open (device_name, open_flag, 0, 0, io_ptr, &fs);
392 get_root_type(fs);
395 return (ext2fs_close (fs) ? 1 : 0);