• Home
  • Raw
  • Download

Lines Matching refs:fc

25 static int mtd_test_super(struct super_block *sb, struct fs_context *fc)  in mtd_test_super()  argument
27 struct mtd_info *mtd = fc->sget_key; in mtd_test_super()
29 if (sb->s_mtd == fc->sget_key) { in mtd_test_super()
45 static int mtd_set_super(struct super_block *sb, struct fs_context *fc) in mtd_set_super() argument
47 sb->s_mtd = fc->sget_key; in mtd_set_super()
56 static int mtd_get_sb(struct fs_context *fc, in mtd_get_sb() argument
64 fc->sget_key = mtd; in mtd_get_sb()
65 sb = sget_fc(fc, mtd_test_super, mtd_set_super); in mtd_get_sb()
79 ret = fill_super(sb, fc); in mtd_get_sb()
86 BUG_ON(fc->root); in mtd_get_sb()
87 fc->root = dget(sb->s_root); in mtd_get_sb()
98 static int mtd_get_sb_by_nr(struct fs_context *fc, int mtdnr, in mtd_get_sb_by_nr() argument
106 errorf(fc, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr); in mtd_get_sb_by_nr()
110 return mtd_get_sb(fc, mtd, fill_super); in mtd_get_sb_by_nr()
118 int get_tree_mtd(struct fs_context *fc, in get_tree_mtd() argument
120 struct fs_context *fc)) in get_tree_mtd()
128 if (!fc->source) in get_tree_mtd()
129 return invalf(fc, "No source specified"); in get_tree_mtd()
131 pr_debug("MTDSB: dev_name \"%s\"\n", fc->source); in get_tree_mtd()
138 if (fc->source[0] == 'm' && in get_tree_mtd()
139 fc->source[1] == 't' && in get_tree_mtd()
140 fc->source[2] == 'd') { in get_tree_mtd()
141 if (fc->source[3] == ':') { in get_tree_mtd()
146 fc->source + 4); in get_tree_mtd()
148 mtd = get_mtd_device_nm(fc->source + 4); in get_tree_mtd()
150 return mtd_get_sb(fc, mtd, fill_super); in get_tree_mtd()
152 errorf(fc, "MTD: MTD device with name \"%s\" not found", in get_tree_mtd()
153 fc->source + 4); in get_tree_mtd()
155 } else if (isdigit(fc->source[3])) { in get_tree_mtd()
159 mtdnr = simple_strtoul(fc->source + 3, &endptr, 0); in get_tree_mtd()
163 return mtd_get_sb_by_nr(fc, mtdnr, fill_super); in get_tree_mtd()
172 bdev = lookup_bdev(fc->source); in get_tree_mtd()
175 errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret); in get_tree_mtd()
185 return mtd_get_sb_by_nr(fc, mtdnr, fill_super); in get_tree_mtd()
189 if (!(fc->sb_flags & SB_SILENT)) in get_tree_mtd()
190 errorf(fc, "MTD: Attempt to mount non-MTD device \"%s\"", in get_tree_mtd()
191 fc->source); in get_tree_mtd()