int crypt_header_is_detached(struct crypt_device *cd)
{
	int r;

	if (!cd || !isLUKS(cd->type))
		return -EINVAL;

	r = device_is_identical(crypt_data_device(cd), crypt_metadata_device(cd));
	if (r < 0) {
		log_dbg(cd, "Failed to compare data and metadata devices path.");
		return r;
	}

	return r ? 0 : 1;
}
int crypt_header_is_detached(struct crypt_device *cd)
{
	int r;

	if (!cd || !isLUKS(cd->type))
		return -EINVAL;

	r = device_is_identical(crypt_data_device(cd), crypt_metadata_device(cd));
	if (r < 0) {
		log_dbg(cd, "Failed to compare data and metadata devices path.");
		return r;
	}

	return r ? 0 : 1;
}