Lines Matching refs:segment
44 size_t segment; in romfs_mtd_strnlen() local
51 segment = min_t(size_t, maxlen, 16); in romfs_mtd_strnlen()
52 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
74 size_t len, segment; in romfs_mtd_strcmp() local
82 segment = min_t(size_t, size + 1, 17); in romfs_mtd_strcmp()
83 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp()
112 size_t segment; in romfs_blk_read() local
117 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read()
121 memcpy(buf, bh->b_data + offset, segment); in romfs_blk_read()
123 buf += segment; in romfs_blk_read()
124 buflen -= segment; in romfs_blk_read()
125 pos += segment; in romfs_blk_read()
140 size_t segment; in romfs_blk_strnlen() local
146 segment = min_t(size_t, limit, ROMBSIZE - offset); in romfs_blk_strnlen()
151 p = memchr(buf, 0, segment); in romfs_blk_strnlen()
155 limit -= segment; in romfs_blk_strnlen()
156 pos += segment; in romfs_blk_strnlen()
157 n += segment; in romfs_blk_strnlen()
172 size_t segment; in romfs_blk_strcmp() local
178 segment = min_t(size_t, size, ROMBSIZE - offset); in romfs_blk_strcmp()
182 matched = (memcmp(bh->b_data + offset, str, segment) == 0); in romfs_blk_strcmp()
184 size -= segment; in romfs_blk_strcmp()
185 pos += segment; in romfs_blk_strcmp()
186 str += segment; in romfs_blk_strcmp()
187 if (matched && size == 0 && offset + segment < ROMBSIZE) { in romfs_blk_strcmp()
188 if (!bh->b_data[offset + segment]) in romfs_blk_strcmp()