Lines Matching refs:segment
40 size_t segment; in romfs_mtd_strnlen() local
47 segment = min_t(size_t, maxlen, 16); in romfs_mtd_strnlen()
48 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
70 size_t len, segment; in romfs_mtd_strcmp() local
78 segment = min_t(size_t, size + 1, 17); in romfs_mtd_strcmp()
79 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp()
108 size_t segment; in romfs_blk_read() local
113 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read()
117 memcpy(buf, bh->b_data + offset, segment); in romfs_blk_read()
119 buf += segment; in romfs_blk_read()
120 buflen -= segment; in romfs_blk_read()
121 pos += segment; in romfs_blk_read()
136 size_t segment; in romfs_blk_strnlen() local
142 segment = min_t(size_t, limit, ROMBSIZE - offset); in romfs_blk_strnlen()
147 p = memchr(buf, 0, segment); in romfs_blk_strnlen()
151 limit -= segment; in romfs_blk_strnlen()
152 pos += segment; in romfs_blk_strnlen()
153 n += segment; in romfs_blk_strnlen()
168 size_t segment; in romfs_blk_strcmp() local
174 segment = min_t(size_t, size, ROMBSIZE - offset); in romfs_blk_strcmp()
178 matched = (memcmp(bh->b_data + offset, str, segment) == 0); in romfs_blk_strcmp()
180 size -= segment; in romfs_blk_strcmp()
181 pos += segment; in romfs_blk_strcmp()
182 str += segment; in romfs_blk_strcmp()
183 if (matched && size == 0 && offset + segment < ROMBSIZE) { in romfs_blk_strcmp()
184 if (!bh->b_data[offset + segment]) in romfs_blk_strcmp()