Lines Matching refs:state
71 * @state
76 * Description: Reads @count bytes from @state->disk into @buffer.
79 static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 *buffer,
84 if (!buffer || lba + count / 512 > get_capacity(state->disk) - 1ULL)
90 unsigned char *data = read_part_sector(state, lba++, §);
106 * @state
113 static struct pvd *alloc_pvd(struct parsed_partitions *state, u32 lba)
122 if (read_lba(state, lba, (u8 *) p, count) < count) {
131 * @state
138 static struct lvname *alloc_lvn(struct parsed_partitions *state, u32 lba)
147 if (read_lba(state, lba, (u8 *) p, count) < count) {
154 int aix_partition(struct parsed_partitions *state)
172 d = read_part_sector(state, 7, §);
193 strlcat(state->pp_buf, tmp, PAGE_SIZE);
196 if (vgda_sector && (d = read_part_sector(state, vgda_sector, §))) {
202 lvip = kcalloc(state->limit, sizeof(struct lv_info), GFP_KERNEL);
205 if (numlvs && (d = read_part_sector(state, vgda_sector + 1, §))) {
209 n = alloc_lvn(state, vgda_sector + vgda_len - 33);
213 for (i = 0; foundlvs < numlvs && i < state->limit; i += 1) {
219 pvd = alloc_pvd(state, vgda_sector + 17);
241 if (lv_ix >= state->limit) {
256 put_partition(state, lv_ix + 1,
261 strlcat(state->pp_buf, tmp, PAGE_SIZE);
268 for (i = 0; i < state->limit; i += 1)