Lines Matching refs:state

25 adfs_partition(struct parsed_partitions *state, char *name, char *data,
43 strlcat(state->pp_buf, " [", PAGE_SIZE);
44 strlcat(state->pp_buf, name, PAGE_SIZE);
45 strlcat(state->pp_buf, "]", PAGE_SIZE);
47 put_partition(state, slot, first_sector, nr_sects);
70 static int riscix_partition(struct parsed_partitions *state,
77 rr = read_part_sector(state, first_sect, &sect);
81 strlcat(state->pp_buf, " [RISCiX]", PAGE_SIZE);
88 strlcat(state->pp_buf, " <", PAGE_SIZE);
90 put_partition(state, slot++, first_sect, size);
94 put_partition(state, slot++,
97 strlcat(state->pp_buf, "(", PAGE_SIZE);
98 strlcat(state->pp_buf, rr->part[part].name, PAGE_SIZE);
99 strlcat(state->pp_buf, ")", PAGE_SIZE);
103 strlcat(state->pp_buf, " >\n", PAGE_SIZE);
105 put_partition(state, slot++, first_sect, nr_sects);
125 static int linux_partition(struct parsed_partitions *state,
133 strlcat(state->pp_buf, " [Linux]", PAGE_SIZE);
135 put_partition(state, slot++, first_sect, size);
137 linuxp = read_part_sector(state, first_sect, &sect);
141 strlcat(state->pp_buf, " <", PAGE_SIZE);
144 if (slot == state->limit)
146 put_partition(state, slot++, first_sect +
151 strlcat(state->pp_buf, " >", PAGE_SIZE);
159 int adfspart_check_CUMANA(struct parsed_partitions *state)
186 data = read_part_sector(state, start_blk * 2 + 6, &sect);
190 if (slot == state->limit)
193 dr = adfs_partition(state, name, data, first_sector, slot++);
218 slot = riscix_partition(state, first_sector, slot,
224 slot = linux_partition(state, first_sector, slot,
250 int adfspart_check_ADFS(struct parsed_partitions *state)
259 data = read_part_sector(state, 6, &sect);
263 dr = adfs_partition(state, "ADFS", data, 0, slot++);
278 nr_sects = get_capacity(state->disk) - start_sect;
285 riscix_partition(state, start_sect, slot,
291 linux_partition(state, start_sect, slot,
296 strlcat(state->pp_buf, "\n", PAGE_SIZE);
308 static int adfspart_check_ICSLinux(struct parsed_partitions *state,
312 unsigned char *data = read_part_sector(state, block, &sect);
350 int adfspart_check_ICS(struct parsed_partitions *state)
360 data = read_part_sector(state, 0, &sect);
369 strlcat(state->pp_buf, " [ICS]", PAGE_SIZE);
375 if (slot == state->limit)
392 if (size > 1 && adfspart_check_ICSLinux(state, start)) {
399 put_partition(state, slot++, start, size);
403 strlcat(state->pp_buf, "\n", PAGE_SIZE);
446 int adfspart_check_POWERTEC(struct parsed_partitions *state)
454 data = read_part_sector(state, 0, &sect);
463 strlcat(state->pp_buf, " [POWERTEC]", PAGE_SIZE);
470 put_partition(state, slot++, start, size);
474 strlcat(state->pp_buf, "\n", PAGE_SIZE);
507 int adfspart_check_EESOX(struct parsed_partitions *state)
516 data = read_part_sector(state, 7, &sect);
536 put_partition(state, slot++, start, next - start);
543 size = get_capacity(state->disk);
544 put_partition(state, slot++, start, size - start);
545 strlcat(state->pp_buf, "\n", PAGE_SIZE);