Home | History | Annotate | Download | only in misc

Lines Matching defs:fs

15  *     if it should ignore the fs type. This way more fsck programs
122 static const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
246 struct fs_info *fs;
248 if (!(fs = malloc(sizeof(struct fs_info))))
251 fs->device = string_copy(device);
252 fs->mountpt = string_copy(mntpnt);
253 fs->type = string_copy(type);
254 fs->opts = string_copy(opts ? opts : "");
255 fs->freq = freq;
256 fs->passno = passno;
257 fs->flags = 0;
258 fs->next = NULL;
261 filesys_info = fs;
263 filesys_last->next = fs;
264 filesys_last = fs;
266 return fs;
274 struct fs_info *fs;
306 fs = create_fs_device(device, mntpnt, type ? type : "auto", opts,
311 if (!fs)
313 *ret_fs = fs;
317 static void interpret_type(struct fs_info *fs)
321 if (strcmp(fs->type, "auto") != 0)
323 t = blkid_get_tag_value(cache, "TYPE", fs->device);
325 free(fs->type);
326 fs->type = t;
339 struct fs_info *fs;
351 if (parse_fstab_line(buf, &fs) < 0) {
356 if (!fs)
358 if (fs->passno < 0)
359 fs->passno = 0;
373 for (fs = filesys_info; fs; fs = fs->next) {
374 fs->passno = 1;
382 struct fs_info *fs;
388 for (fs = filesys_info; fs; fs = fs->next) {
389 if (!strcmp(filesys, fs->device) ||
390 (fs->mountpt && !strcmp(filesys, fs->mountpt)))
394 return fs;
397 /* Find fsck program for a given fs type. */
701 static void fsck_device(struct fs_info *fs, int interactive)
706 interpret_type(fs);
708 if (strcmp(fs->type, "auto") != 0)
709 type = fs->type;
718 retval = execute(type, fs->device, fs->mountpt, interactive);
721 "for %s\n"), progname, retval, type, fs->device);
835 static int fs_match(struct fs_info *fs, struct fs_type_compile *cmp)
847 if (strcmp(cp, fs->type) == 0) {
852 if (opt_in_list(cp, fs->opts))
856 if (!opt_in_list(cp, fs->opts))
867 static int ignore(struct fs_info *fs)
875 if (fs->passno == 0)
881 if (opt_in_list("bind", fs->opts)) {
884 fs->mountpt);
888 interpret_type(fs);
894 if (!fs_match(fs, &fs_type_compiled)) return 1;
898 if (strcmp(fs->type, *ip) == 0) return 1;
900 /* Do we really really want to check this fs? */
902 if (strcmp(fs->type, *ip) == 0) {
907 /* See if the <fsck.fs> program is available. */
908 if (find_fsck(fs->type) == NULL) {
911 fs->device, fs->type);
959 struct fs_info *fs = NULL;
973 for (fs = filesys_info; fs; fs = fs->next) {
974 if (ignore(fs))
975 fs->flags |= FLAG_DONE;
982 for (fs = filesys_info; fs; fs = fs->next) {
983 if (!strcmp(fs->mountpt, "/"))
986 if (fs) {
987 if (!skip_root && !ignore(fs) &&
988 !(ignore_mounted && is_mounted(fs->device))) {
989 fsck_device(fs, 1);
994 fs->flags |= FLAG_DONE;
1002 for (fs = filesys_info; fs; fs = fs->next)
1003 if (!strcmp(fs->mountpt, "/"))
1004 fs->flags |= FLAG_DONE;
1010 for (fs = filesys_info; fs; fs = fs->next) {
1013 if (fs->flags & FLAG_DONE)
1020 if (fs->passno > passno) {
1024 if (ignore_mounted && is_mounted(fs->device)) {
1025 fs->flags |= FLAG_DONE;
1033 if (device_already_active(fs->device)) {
1040 fsck_device(fs, serialize);
1041 fs->flags |= FLAG_DONE;
1077 fputs(_("Usage: fsck [-AMNPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"), stderr);
1258 struct fs_info *fs;
1315 fs = lookup(devices[i]);
1316 if (!fs) {
1317 fs = create_fs_device(devices[i], 0, "auto",
1319 if (!fs)
1322 if (ignore_mounted && is_mounted(fs->device))
1324 fsck_device(fs, interactive);