Lines Matching defs:pos

23 static int romfs_mtd_read(struct super_block *sb, unsigned long pos,
29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf);
37 unsigned long pos, size_t maxlen)
48 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf);
55 pos += len;
66 static int romfs_mtd_strcmp(struct super_block *sb, unsigned long pos,
79 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf);
87 pos += len;
103 static int romfs_blk_read(struct super_block *sb, unsigned long pos,
112 offset = pos & (ROMBSIZE - 1);
114 bh = sb_bread(sb, pos >> ROMBSBITS);
121 pos += segment;
131 unsigned long pos, size_t limit)
141 offset = pos & (ROMBSIZE - 1);
143 bh = sb_bread(sb, pos >> ROMBSBITS);
152 pos += segment;
163 static int romfs_blk_strcmp(struct super_block *sb, unsigned long pos,
173 offset = pos & (ROMBSIZE - 1);
175 bh = sb_bread(sb, pos >> ROMBSBITS);
181 pos += segment;
197 BUG_ON((pos & (ROMBSIZE - 1)) != 0);
198 bh = sb_bread(sb, pos >> ROMBSBITS);
214 int romfs_dev_read(struct super_block *sb, unsigned long pos,
220 if (pos >= limit || buflen > limit - pos)
225 return romfs_mtd_read(sb, pos, buf, buflen);
229 return romfs_blk_read(sb, pos, buf, buflen);
238 unsigned long pos, size_t maxlen)
243 if (pos >= limit)
245 if (maxlen > limit - pos)
246 maxlen = limit - pos;
250 return romfs_mtd_strnlen(sb, pos, maxlen);
254 return romfs_blk_strnlen(sb, pos, maxlen);
265 int romfs_dev_strcmp(struct super_block *sb, unsigned long pos,
271 if (pos >= limit)
275 if (size + 1 > limit - pos)
280 return romfs_mtd_strcmp(sb, pos, str, size);
284 return romfs_blk_strcmp(sb, pos, str, size);