}
disk->data = dev;
- disk->total_sectors = dev->total_length;
+ disk->total_sectors = dev->total_sectors;
disk->max_agglomerate = GRUB_DISK_MAX_MAX_AGGLOMERATE;
disk->id = dev->id;
dev->ref++;
newdev->modname = "geli";
- newdev->total_length = grub_disk_get_size (disk) - 1;
+ newdev->total_sectors = grub_disk_get_size (disk) - 1;
grub_memcpy (newdev->uuid, uuid, sizeof (newdev->uuid));
COMPILE_TIME_ASSERT (sizeof (newdev->uuid) >= 32 * 2 + 1);
return newdev;
newdev->offset = grub_be_to_cpu32 (header.payloadOffset);
newdev->source_disk = NULL;
newdev->log_sector_size = 9;
- newdev->total_length = grub_disk_get_size (disk) - newdev->offset;
+ newdev->total_sectors = grub_disk_get_size (disk) - newdev->offset;
grub_memcpy (newdev->uuid, uuid, sizeof (uuid));
newdev->modname = "luks";
crypt->log_sector_size = sizeof (unsigned int) * 8
- __builtin_clz ((unsigned int) segment.sector_size) - 1;
if (grub_strcmp (segment.size, "dynamic") == 0)
- crypt->total_length = grub_disk_get_size (disk) - crypt->offset;
+ crypt->total_sectors = grub_disk_get_size (disk) - crypt->offset;
else
- crypt->total_length = grub_strtoull (segment.size, NULL, 10);
+ crypt->total_sectors = grub_strtoull (segment.size, NULL, 10);
ret = luks2_decrypt_key (candidate_key, disk, crypt, &keyslot,
(const grub_uint8_t *) passphrase, grub_strlen (passphrase));
char *source;
grub_disk_addr_t offset;
- grub_disk_addr_t total_length;
+ /* Total number of encrypted sectors of size (1 << log_sector_size). */
+ grub_disk_addr_t total_sectors;
grub_disk_t source_disk;
int ref;
grub_crypto_cipher_handle_t cipher;