Lines Matching defs:dlp

496 	struct disklabel64 *dlp;
509 dlp = (struct disklabel64 *)buf;
510 basetable->gpt_entries = le32toh(dlp->d_npartitions);
514 v32 = le32toh(dlp->d_crc);
515 dlp->d_crc = 0;
516 if (crc32(&dlp->d_magic, offsetof(struct disklabel64,
520 table->d_align = le32toh(dlp->d_align);
523 if (le64toh(dlp->d_total_size) > pp->mediasize)
525 v64 = le64toh(dlp->d_pbase);
529 v64 = le64toh(dlp->d_pstop);
534 v64 = le64toh(dlp->d_bbase);
538 v64 = le64toh(dlp->d_abase);
542 le_uuid_dec(&dlp->d_stor_uuid, &table->d_stor_uuid);
551 v64 = le64toh(dlp->d_partitions[index].p_boffset);
552 sz = le64toh(dlp->d_partitions[index].p_bsize);
560 le_uuid_dec(&dlp->d_partitions[index].p_type_uuid,
562 le_uuid_dec(&dlp->d_partitions[index].p_stor_uuid,
564 entry->fstype = dlp->d_partitions[index].p_fstype;
566 bcopy(dlp->d_reserved0, table->d_reserved0,
568 bcopy(dlp->d_packname, table->d_packname, sizeof(table->d_packname));
569 bcopy(dlp->d_reserved, table->d_reserved, sizeof(table->d_reserved));
614 struct disklabel64 *dlp;
621 dlp = g_malloc(sz, M_WAITOK | M_ZERO);
623 memcpy(dlp->d_reserved0, table->d_reserved0,
625 memcpy(dlp->d_packname, table->d_packname, sizeof(table->d_packname));
626 memcpy(dlp->d_reserved, table->d_reserved, sizeof(table->d_reserved));
627 le32enc(&dlp->d_magic, DISKMAGIC64);
628 le32enc(&dlp->d_align, table->d_align);
629 le32enc(&dlp->d_npartitions, basetable->gpt_entries);
630 le_uuid_enc(&dlp->d_stor_uuid, &table->d_stor_uuid);
631 le64enc(&dlp->d_total_size, pp->mediasize);
632 le64enc(&dlp->d_bbase, table->d_bbase * pp->sectorsize);
633 le64enc(&dlp->d_pbase, basetable->gpt_first * pp->sectorsize);
634 le64enc(&dlp->d_pstop, basetable->gpt_last * pp->sectorsize);
635 le64enc(&dlp->d_abase, table->d_abase * pp->sectorsize);
644 le64enc(&dlp->d_partitions[index].p_boffset,
646 le64enc(&dlp->d_partitions[index].p_bsize, pp->sectorsize *
648 dlp->d_partitions[index].p_fstype = entry->fstype;
649 le_uuid_enc(&dlp->d_partitions[index].p_type_uuid,
651 le_uuid_enc(&dlp->d_partitions[index].p_stor_uuid,
658 le32enc(&dlp->d_crc, crc32(&dlp->d_magic, v));
659 error = g_write_data(cp, 0, dlp, sz);
660 g_free(dlp);