Lines Matching refs:sb
18 #define ROMFS_MTD_READ(sb, ...) mtd_read((sb)->s_mtd, ##__VA_ARGS__)
23 static int romfs_mtd_read(struct super_block *sb, unsigned long pos,
29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf);
36 static ssize_t romfs_mtd_strnlen(struct super_block *sb,
48 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf);
66 static int romfs_mtd_strcmp(struct super_block *sb, unsigned long pos,
79 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf);
103 static int romfs_blk_read(struct super_block *sb, unsigned long pos,
114 bh = sb_bread(sb, pos >> ROMBSBITS);
130 static ssize_t romfs_blk_strnlen(struct super_block *sb,
143 bh = sb_bread(sb, pos >> ROMBSBITS);
163 static int romfs_blk_strcmp(struct super_block *sb, unsigned long pos,
175 bh = sb_bread(sb, pos >> ROMBSBITS);
198 bh = sb_bread(sb, pos >> ROMBSBITS);
214 int romfs_dev_read(struct super_block *sb, unsigned long pos,
219 limit = romfs_maxsize(sb);
224 if (sb->s_mtd)
225 return romfs_mtd_read(sb, pos, buf, buflen);
228 if (sb->s_bdev)
229 return romfs_blk_read(sb, pos, buf, buflen);
237 ssize_t romfs_dev_strnlen(struct super_block *sb,
242 limit = romfs_maxsize(sb);
249 if (sb->s_mtd)
250 return romfs_mtd_strnlen(sb, pos, maxlen);
253 if (sb->s_bdev)
254 return romfs_blk_strnlen(sb, pos, maxlen);
265 int romfs_dev_strcmp(struct super_block *sb, unsigned long pos,
270 limit = romfs_maxsize(sb);
279 if (sb->s_mtd)
280 return romfs_mtd_strcmp(sb, pos, str, size);
283 if (sb->s_bdev)
284 return romfs_blk_strcmp(sb, pos, str, size);