Lines Matching refs:state
31 adfs_partition(struct parsed_partitions *state, char *name, char *data, in adfs_partition() argument
49 strlcat(state->pp_buf, " [", PAGE_SIZE); in adfs_partition()
50 strlcat(state->pp_buf, name, PAGE_SIZE); in adfs_partition()
51 strlcat(state->pp_buf, "]", PAGE_SIZE); in adfs_partition()
53 put_partition(state, slot, first_sector, nr_sects); in adfs_partition()
76 static int riscix_partition(struct parsed_partitions *state, in riscix_partition() argument
83 rr = read_part_sector(state, first_sect, §); in riscix_partition()
87 strlcat(state->pp_buf, " [RISCiX]", PAGE_SIZE); in riscix_partition()
94 strlcat(state->pp_buf, " <", PAGE_SIZE); in riscix_partition()
96 put_partition(state, slot++, first_sect, size); in riscix_partition()
100 put_partition(state, slot++, in riscix_partition()
103 strlcat(state->pp_buf, "(", PAGE_SIZE); in riscix_partition()
104 strlcat(state->pp_buf, rr->part[part].name, PAGE_SIZE); in riscix_partition()
105 strlcat(state->pp_buf, ")", PAGE_SIZE); in riscix_partition()
109 strlcat(state->pp_buf, " >\n", PAGE_SIZE); in riscix_partition()
111 put_partition(state, slot++, first_sect, nr_sects); in riscix_partition()
131 static int linux_partition(struct parsed_partitions *state, in linux_partition() argument
139 strlcat(state->pp_buf, " [Linux]", PAGE_SIZE); in linux_partition()
141 put_partition(state, slot++, first_sect, size); in linux_partition()
143 linuxp = read_part_sector(state, first_sect, §); in linux_partition()
147 strlcat(state->pp_buf, " <", PAGE_SIZE); in linux_partition()
150 if (slot == state->limit) in linux_partition()
152 put_partition(state, slot++, first_sect + in linux_partition()
157 strlcat(state->pp_buf, " >", PAGE_SIZE); in linux_partition()
165 int adfspart_check_CUMANA(struct parsed_partitions *state) in adfspart_check_CUMANA() argument
192 data = read_part_sector(state, start_blk * 2 + 6, §); in adfspart_check_CUMANA()
196 if (slot == state->limit) in adfspart_check_CUMANA()
199 dr = adfs_partition(state, name, data, first_sector, slot++); in adfspart_check_CUMANA()
224 slot = riscix_partition(state, first_sector, slot, in adfspart_check_CUMANA()
230 slot = linux_partition(state, first_sector, slot, in adfspart_check_CUMANA()
256 int adfspart_check_ADFS(struct parsed_partitions *state) in adfspart_check_ADFS() argument
265 data = read_part_sector(state, 6, §); in adfspart_check_ADFS()
269 dr = adfs_partition(state, "ADFS", data, 0, slot++); in adfspart_check_ADFS()
284 nr_sects = (state->bdev->bd_inode->i_size >> 9) - start_sect; in adfspart_check_ADFS()
291 slot = riscix_partition(state, start_sect, slot, in adfspart_check_ADFS()
297 slot = linux_partition(state, start_sect, slot, in adfspart_check_ADFS()
302 strlcat(state->pp_buf, "\n", PAGE_SIZE); in adfspart_check_ADFS()
314 static int adfspart_check_ICSLinux(struct parsed_partitions *state, in adfspart_check_ICSLinux() argument
318 unsigned char *data = read_part_sector(state, block, §); in adfspart_check_ICSLinux()
356 int adfspart_check_ICS(struct parsed_partitions *state) in adfspart_check_ICS() argument
366 data = read_part_sector(state, 0, §); in adfspart_check_ICS()
375 strlcat(state->pp_buf, " [ICS]", PAGE_SIZE); in adfspart_check_ICS()
381 if (slot == state->limit) in adfspart_check_ICS()
398 if (size > 1 && adfspart_check_ICSLinux(state, start)) { in adfspart_check_ICS()
405 put_partition(state, slot++, start, size); in adfspart_check_ICS()
409 strlcat(state->pp_buf, "\n", PAGE_SIZE); in adfspart_check_ICS()
452 int adfspart_check_POWERTEC(struct parsed_partitions *state) in adfspart_check_POWERTEC() argument
460 data = read_part_sector(state, 0, §); in adfspart_check_POWERTEC()
469 strlcat(state->pp_buf, " [POWERTEC]", PAGE_SIZE); in adfspart_check_POWERTEC()
476 put_partition(state, slot++, start, size); in adfspart_check_POWERTEC()
480 strlcat(state->pp_buf, "\n", PAGE_SIZE); in adfspart_check_POWERTEC()
513 int adfspart_check_EESOX(struct parsed_partitions *state) in adfspart_check_EESOX() argument
522 data = read_part_sector(state, 7, §); in adfspart_check_EESOX()
542 put_partition(state, slot++, start, next - start); in adfspart_check_EESOX()
549 size = get_capacity(state->bdev->bd_disk); in adfspart_check_EESOX()
550 put_partition(state, slot++, start, size - start); in adfspart_check_EESOX()
551 strlcat(state->pp_buf, "\n", PAGE_SIZE); in adfspart_check_EESOX()