Lines Matching refs:part
39 static int write_nvram_header(struct nvram_partition * part);
412 struct nvram_partition * part; in setup_nvram_partition() local
419 part = list_entry(p, struct nvram_partition, partition); in setup_nvram_partition()
420 if (part->header.signature != NVRAM_SIG_OS) in setup_nvram_partition()
423 if (strcmp(part->header.name, "ppc64,linux")) in setup_nvram_partition()
426 if (part->header.length >= NVRAM_MIN_REQ) { in setup_nvram_partition()
428 error_log_nvram_index = part->index + NVRAM_HEADER_LEN; in setup_nvram_partition()
429 error_log_nvram_size = (part->header.length * NVRAM_BLOCK_LEN) - in setup_nvram_partition()
462 struct nvram_partition * part; in remove_os_nvram_partition() local
467 part = list_entry(i, struct nvram_partition, partition); in remove_os_nvram_partition()
468 if (part->header.signature != NVRAM_SIG_OS) in remove_os_nvram_partition()
472 part->header.signature = NVRAM_SIG_FREE; in remove_os_nvram_partition()
473 sprintf(part->header.name, "wwwwwwwwwwww"); in remove_os_nvram_partition()
474 part->header.checksum = nvram_checksum(&part->header); in remove_os_nvram_partition()
477 list_for_each_prev(j, &part->partition) { in remove_os_nvram_partition()
483 part->header.length += cur_part->header.length; in remove_os_nvram_partition()
484 part->header.checksum = nvram_checksum(&part->header); in remove_os_nvram_partition()
485 part->index = cur_part->index; in remove_os_nvram_partition()
489 j = &part->partition; /* fixup our loop */ in remove_os_nvram_partition()
493 list_for_each(j, &part->partition) { in remove_os_nvram_partition()
499 part->header.length += cur_part->header.length; in remove_os_nvram_partition()
500 part->header.checksum = nvram_checksum(&part->header); in remove_os_nvram_partition()
504 j = &part->partition; /* fixup our loop */ in remove_os_nvram_partition()
507 rc = write_nvram_header(part); in remove_os_nvram_partition()
527 struct nvram_partition * part; in create_os_nvram_partition() local
538 part = list_entry(p, struct nvram_partition, partition); in create_os_nvram_partition()
539 if (part->header.signature != NVRAM_SIG_FREE) in create_os_nvram_partition()
542 if (part->header.length >= NVRAM_MAX_REQ) { in create_os_nvram_partition()
544 free_part = part; in create_os_nvram_partition()
547 if (!size && part->header.length >= NVRAM_MIN_REQ) { in create_os_nvram_partition()
549 free_part = part; in create_os_nvram_partition()
750 static int write_nvram_header(struct nvram_partition * part) in write_nvram_header() argument
755 tmp_index = part->index; in write_nvram_header()
756 rc = write_nvram((char *)&part->header, NVRAM_HEADER_LEN, &tmp_index); in write_nvram_header()