2009-05-08 Pavel Roskin <proski@gnu.org>
* disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's not modified.
This commit is contained in:
parent
041b8094ac
commit
752473c2b0
3 changed files with 8 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
|||
2009-05-08 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
|
||||
not modified.
|
||||
|
||||
* disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
|
||||
uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
|
||||
Initialize them with -1. Add sanity check for bad1. Eliminate
|
||||
|
|
|
@ -172,12 +172,13 @@ grub_raid_close (grub_disk_t disk __attribute ((unused)))
|
|||
}
|
||||
|
||||
void
|
||||
grub_raid_block_xor (char *buf1, char *buf2, int size)
|
||||
grub_raid_block_xor (char *buf1, const char *buf2, int size)
|
||||
{
|
||||
grub_size_t *p1, *p2;
|
||||
grub_size_t *p1;
|
||||
const grub_size_t *p2;
|
||||
|
||||
p1 = (grub_size_t *) buf1;
|
||||
p2 = (grub_size_t *) buf2;
|
||||
p2 = (const grub_size_t *) buf2;
|
||||
size /= GRUB_CPU_SIZEOF_VOID_P;
|
||||
|
||||
while (size)
|
||||
|
|
|
@ -68,7 +68,7 @@ void grub_raid_register (grub_raid_t raid);
|
|||
void grub_raid_unregister (grub_raid_t raid);
|
||||
|
||||
void grub_raid_rescan (void);
|
||||
void grub_raid_block_xor (char *buf1, char *buf2, int size);
|
||||
void grub_raid_block_xor (char *buf1, const char *buf2, int size);
|
||||
|
||||
typedef grub_err_t (*grub_raid5_recover_func_t) (struct grub_raid_array *array,
|
||||
int disknr, char *buf,
|
||||
|
|
Loading…
Reference in a new issue