Unify and improve RAID and crypto xor.

* grub-core/disk/raid.c (grub_raid_block_xor): Removed. All users
	changed to grub_crypto_xor
	* grub-core/lib/crypto.c (grub_crypto_xor): Moved from here ...
	* include/grub/crypto.h (grub_crypto_xor): ... here. Inlined.
	Use bigger types when possible.
This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2011-12-13 01:26:53 +01:00
1 parent ef6e433586
commit 496bd07446
6 files changed
+54 -41

No files matched your search

-17
View File
@@ -332,23 +332,6 @@ grub_raid_close (grub_disk_t disk __attribute ((unused)))
return;
}
void
grub_raid_block_xor (char *buf1, const char *buf2, int size)
{
grub_size_t *p1;
const grub_size_t *p2;
p1 = (grub_size_t *) buf1;
p2 = (const grub_size_t *) buf2;
size /= GRUB_CPU_SIZEOF_VOID_P;
while (size)
{
*(p1++) ^= *(p2++);
size--;
}
}
static grub_err_t
grub_raid_read (grub_disk_t disk, grub_disk_addr_t sector,
grub_size_t size, char *buf)