static int _compare_volume_keys(struct volume_key *svk, unsigned skeyring_only, struct volume_key *tvk, unsigned tkeyring_only)
{
	if (!svk && !tvk)
		return 0;
	else if (!svk || !tvk)
		return 1;

	if (svk->keylength != tvk->keylength)
		return 1;

	if (!skeyring_only && !tkeyring_only)
		return memcmp(svk->key, tvk->key, svk->keylength);

	if (svk->key_description && tvk->key_description)
		return strcmp(svk->key_description, tvk->key_description);

	return 0;
}
static int _compare_volume_keys(struct volume_key *svk, unsigned skeyring_only, struct volume_key *tvk, unsigned tkeyring_only)
{
	if (!svk && !tvk)
		return 0;
	else if (!svk || !tvk)
		return 1;

	if (svk->keylength != tvk->keylength)
		return 1;

	if (!skeyring_only && !tkeyring_only)
		return memcmp(svk->key, tvk->key, svk->keylength);

	if (svk->key_description && tvk->key_description)
		return strcmp(svk->key_description, tvk->key_description);

	return 0;
}