Lines Matching full:fc
25 static int mtd_get_sb(struct fs_context *fc, in mtd_get_sb() argument
33 sb = sget_dev(fc, MKDEV(MTD_BLOCK_MAJOR, mtd->index)); in mtd_get_sb()
57 ret = fill_super(sb, fc); in mtd_get_sb()
64 BUG_ON(fc->root); in mtd_get_sb()
65 fc->root = dget(sb->s_root); in mtd_get_sb()
76 static int mtd_get_sb_by_nr(struct fs_context *fc, int mtdnr, in mtd_get_sb_by_nr() argument
84 errorf(fc, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr); in mtd_get_sb_by_nr()
88 return mtd_get_sb(fc, mtd, fill_super); in mtd_get_sb_by_nr()
93 * @fc: The filesystem context holding the parameters
96 int get_tree_mtd(struct fs_context *fc, in get_tree_mtd() argument
98 struct fs_context *fc)) in get_tree_mtd()
106 if (!fc->source) in get_tree_mtd()
107 return invalf(fc, "No source specified"); in get_tree_mtd()
109 pr_debug("MTDSB: dev_name \"%s\"\n", fc->source); in get_tree_mtd()
116 if (fc->source[0] == 'm' && in get_tree_mtd()
117 fc->source[1] == 't' && in get_tree_mtd()
118 fc->source[2] == 'd') { in get_tree_mtd()
119 if (fc->source[3] == ':') { in get_tree_mtd()
124 fc->source + 4); in get_tree_mtd()
126 mtd = get_mtd_device_nm(fc->source + 4); in get_tree_mtd()
128 return mtd_get_sb(fc, mtd, fill_super); in get_tree_mtd()
130 errorf(fc, "MTD: MTD device with name \"%s\" not found", in get_tree_mtd()
131 fc->source + 4); in get_tree_mtd()
133 } else if (isdigit(fc->source[3])) { in get_tree_mtd()
137 mtdnr = simple_strtoul(fc->source + 3, &endptr, 0); in get_tree_mtd()
141 return mtd_get_sb_by_nr(fc, mtdnr, fill_super); in get_tree_mtd()
150 ret = lookup_bdev(fc->source, &dev); in get_tree_mtd()
152 errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret); in get_tree_mtd()
158 return mtd_get_sb_by_nr(fc, MINOR(dev), fill_super); in get_tree_mtd()
162 if (!(fc->sb_flags & SB_SILENT)) in get_tree_mtd()
163 errorf(fc, "MTD: Attempt to mount non-MTD device \"%s\"", in get_tree_mtd()
164 fc->source); in get_tree_mtd()