Lines Matching defs:state
87 * @state
92 * Description: Reads @count bytes from @state->bdev into @buffer.
95 static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 *buffer,
100 if (!buffer || lba + count / 512 > last_lba(state->bdev))
106 unsigned char *data = read_part_sector(state, lba++, §);
122 * @state
129 static struct pvd *alloc_pvd(struct parsed_partitions *state, u32 lba)
138 if (read_lba(state, lba, (u8 *) p, count) < count) {
147 * @state
154 static struct lvname *alloc_lvn(struct parsed_partitions *state, u32 lba)
163 if (read_lba(state, lba, (u8 *) p, count) < count) {
170 int aix_partition(struct parsed_partitions *state)
188 d = read_part_sector(state, 7, §);
209 strlcat(state->pp_buf, tmp, PAGE_SIZE);
212 if (vgda_sector && (d = read_part_sector(state, vgda_sector, §))) {
218 lvip = kcalloc(state->limit, sizeof(struct lv_info), GFP_KERNEL);
221 if (numlvs && (d = read_part_sector(state, vgda_sector + 1, §))) {
225 n = alloc_lvn(state, vgda_sector + vgda_len - 33);
229 for (i = 0; foundlvs < numlvs && i < state->limit; i += 1) {
235 pvd = alloc_pvd(state, vgda_sector + 17);
257 if (lv_ix >= state->limit) {
272 put_partition(state, lv_ix + 1,
277 strlcat(state->pp_buf, tmp, PAGE_SIZE);
284 for (i = 0; i < state->limit; i += 1)