• Home
  • Raw
  • Download

Lines Matching refs:pos

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()
41 unsigned long pos, size_t maxlen) in romfs_mtd_strnlen() argument
52 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
59 pos += len; 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()
91 pos += len; in romfs_mtd_strcmp()
107 static int romfs_blk_read(struct super_block *sb, unsigned long pos, in romfs_blk_read() argument
116 offset = pos & (ROMBSIZE - 1); in romfs_blk_read()
118 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_read()
125 pos += segment; in romfs_blk_read()
135 unsigned long pos, size_t limit) in romfs_blk_strnlen() argument
145 offset = pos & (ROMBSIZE - 1); in romfs_blk_strnlen()
147 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_strnlen()
156 pos += segment; in romfs_blk_strnlen()
167 static int romfs_blk_strcmp(struct super_block *sb, unsigned long pos, in romfs_blk_strcmp() argument
177 offset = pos & (ROMBSIZE - 1); in romfs_blk_strcmp()
179 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_strcmp()
185 pos += segment; in romfs_blk_strcmp()
201 BUG_ON((pos & (ROMBSIZE - 1)) != 0); 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
224 if (pos >= limit) in romfs_dev_read()
226 if (buflen > limit - pos) in romfs_dev_read()
227 buflen = limit - pos; in romfs_dev_read()
231 return romfs_mtd_read(sb, pos, buf, buflen); in romfs_dev_read()
235 return romfs_blk_read(sb, pos, buf, buflen); in romfs_dev_read()
244 unsigned long pos, size_t maxlen) in romfs_dev_strnlen() argument
249 if (pos >= limit) in romfs_dev_strnlen()
251 if (maxlen > limit - pos) in romfs_dev_strnlen()
252 maxlen = limit - pos; in romfs_dev_strnlen()
256 return romfs_mtd_strnlen(sb, pos, maxlen); 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
277 if (pos >= limit) in romfs_dev_strcmp()
281 if (size + 1 > limit - pos) in romfs_dev_strcmp()
286 return romfs_mtd_strcmp(sb, pos, str, size); in romfs_dev_strcmp()
290 return romfs_blk_strcmp(sb, pos, str, size); in romfs_dev_strcmp()