int crypt_set_data_offset(struct crypt_device *cd, uint64_t data_offset)
{
	if (!cd)
		return -EINVAL;
	if (data_offset % (MAX_SECTOR_SIZE >> SECTOR_SHIFT)) {
		log_err(cd, _("Data offset is not multiple of %u bytes."), MAX_SECTOR_SIZE);
		return -EINVAL;
	}

	cd->data_offset = data_offset;
	log_dbg(cd, "Data offset set to %" PRIu64 " (512-byte) sectors.", data_offset);

	return 0;
}
int crypt_set_data_offset(struct crypt_device *cd, uint64_t data_offset)
{
	if (!cd)
		return -EINVAL;
	if (data_offset % (MAX_SECTOR_SIZE >> SECTOR_SHIFT)) {
		log_err(cd, _("Data offset is not multiple of %u bytes."), MAX_SECTOR_SIZE);
		return -EINVAL;
	}

	cd->data_offset = data_offset;
	log_dbg(cd, "Data offset set to %" PRIu64 " (512-byte) sectors.", data_offset);

	return 0;
}