2016-05-11 05:42:15 +02:00
|
|
|
Index: LVM2.2.02.152/libdm/datastruct/hash.c
|
2014-09-25 10:31:10 +02:00
|
|
|
===================================================================
|
2016-05-11 05:42:15 +02:00
|
|
|
--- LVM2.2.02.152.orig/libdm/datastruct/hash.c
|
|
|
|
+++ LVM2.2.02.152/libdm/datastruct/hash.c
|
2016-01-28 05:41:36 +01:00
|
|
|
@@ -20,7 +20,7 @@ struct dm_hash_node {
|
2014-09-25 10:31:10 +02:00
|
|
|
void *data;
|
2016-01-28 05:41:36 +01:00
|
|
|
unsigned data_len;
|
2014-09-25 10:31:10 +02:00
|
|
|
unsigned keylen;
|
|
|
|
- char key[0];
|
|
|
|
+ unsigned char key[0];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dm_hash_table {
|
2016-01-28 05:41:36 +01:00
|
|
|
@@ -137,7 +137,7 @@ void dm_hash_destroy(struct dm_hash_tabl
|
2014-09-25 10:31:10 +02:00
|
|
|
static struct dm_hash_node **_find(struct dm_hash_table *t, const void *key,
|
|
|
|
uint32_t len)
|
|
|
|
{
|
|
|
|
- unsigned h = _hash(key, len) & (t->num_slots - 1);
|
|
|
|
+ unsigned h = _hash((unsigned char *)key, len) & (t->num_slots - 1);
|
|
|
|
struct dm_hash_node **c;
|
|
|
|
|
|
|
|
for (c = &t->slots[h]; *c; c = &((*c)->next)) {
|
2016-01-28 05:41:36 +01:00
|
|
|
@@ -361,7 +361,8 @@ void dm_hash_wipe(struct dm_hash_table *
|
2014-09-25 10:31:10 +02:00
|
|
|
char *dm_hash_get_key(struct dm_hash_table *t __attribute__((unused)),
|
|
|
|
struct dm_hash_node *n)
|
|
|
|
{
|
|
|
|
- return n->key;
|
|
|
|
+ return (char *)n->key;
|
|
|
|
+
|
|
|
|
}
|
|
|
|
|
|
|
|
void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)),
|
2016-05-11 05:42:15 +02:00
|
|
|
Index: LVM2.2.02.152/libdm/ioctl/libdm-iface.c
|
2014-09-25 10:31:10 +02:00
|
|
|
===================================================================
|
2016-05-11 05:42:15 +02:00
|
|
|
--- LVM2.2.02.152.orig/libdm/ioctl/libdm-iface.c
|
|
|
|
+++ LVM2.2.02.152/libdm/ioctl/libdm-iface.c
|
2016-01-28 05:41:36 +01:00
|
|
|
@@ -1834,7 +1834,7 @@ static struct dm_ioctl *_do_dm_ioctl(str
|
2016-05-11 05:42:15 +02:00
|
|
|
dmt->secure_data ? "securedata " : "",
|
|
|
|
dmt->query_inactive_table ? "inactive " : "",
|
|
|
|
dmt->enable_checks ? "enablechecks " : "",
|
2014-09-25 10:31:10 +02:00
|
|
|
- dmt->sector, _sanitise_message(dmt->message),
|
|
|
|
+ (unsigned long long int)dmt->sector, _sanitise_message(dmt->message),
|
|
|
|
dmi->data_size, retry_repeat_count);
|
|
|
|
#ifdef DM_IOCTLS
|
2016-01-28 05:41:36 +01:00
|
|
|
r = ioctl(_control_fd, command, dmi);
|