Lines Matching refs:sb
22 #define ROMFS_MTD_READ(sb, ...) mtd_read((sb)->s_mtd, ##__VA_ARGS__) argument
27 static int romfs_mtd_read(struct super_block *sb, unsigned long pos, in romfs_mtd_read() argument
33 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
40 static ssize_t romfs_mtd_strnlen(struct super_block *sb, in romfs_mtd_strnlen() argument
52 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
70 static int romfs_mtd_strcmp(struct super_block *sb, unsigned long pos, in romfs_mtd_strcmp() argument
83 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp()
107 static int romfs_blk_read(struct super_block *sb, unsigned long pos, in romfs_blk_read() argument
118 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_read()
134 static ssize_t romfs_blk_strnlen(struct super_block *sb, in romfs_blk_strnlen() argument
147 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_strnlen()
167 static int romfs_blk_strcmp(struct super_block *sb, unsigned long pos, in romfs_blk_strcmp() argument
179 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_strcmp()
202 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_strcmp()
218 int romfs_dev_read(struct super_block *sb, unsigned long pos, in romfs_dev_read() argument
223 limit = romfs_maxsize(sb); in romfs_dev_read()
230 if (sb->s_mtd) in romfs_dev_read()
231 return romfs_mtd_read(sb, pos, buf, buflen); in romfs_dev_read()
234 if (sb->s_bdev) in romfs_dev_read()
235 return romfs_blk_read(sb, pos, buf, buflen); in romfs_dev_read()
243 ssize_t romfs_dev_strnlen(struct super_block *sb, in romfs_dev_strnlen() argument
248 limit = romfs_maxsize(sb); in romfs_dev_strnlen()
255 if (sb->s_mtd) in romfs_dev_strnlen()
256 return romfs_mtd_strnlen(sb, pos, maxlen); in romfs_dev_strnlen()
259 if (sb->s_bdev) in romfs_dev_strnlen()
260 return romfs_blk_strnlen(sb, pos, maxlen); in romfs_dev_strnlen()
271 int romfs_dev_strcmp(struct super_block *sb, unsigned long pos, in romfs_dev_strcmp() argument
276 limit = romfs_maxsize(sb); in romfs_dev_strcmp()
285 if (sb->s_mtd) in romfs_dev_strcmp()
286 return romfs_mtd_strcmp(sb, pos, str, size); in romfs_dev_strcmp()
289 if (sb->s_bdev) in romfs_dev_strcmp()
290 return romfs_blk_strcmp(sb, pos, str, size); in romfs_dev_strcmp()