1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Void* arithmetic replaced with char*

This commit is contained in:
Zdenek Kabelac 2011-02-18 14:34:41 +00:00
parent ab8b85fb80
commit 4ebc6404ee
3 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.85 -
===================================
Use char* arithmetic in _text_write(), _text_read() & send_message().
Fix compilation when devmapper is dissabled.
Remove fs_unlock() from lv_suspend error path.
Change memory locking semantic and use critical sections.

View File

@ -1867,7 +1867,7 @@ static int send_message(void *buf, int msglen, const char *csid, int fd,
break;
}
len = write(fd, buf + ptr, msglen - ptr);
len = write(fd, (char*)buf + ptr, msglen - ptr);
if (len <= 0) {
if (errno == EINTR)

View File

@ -52,7 +52,7 @@ static int _text_write(struct label *label, void *buf)
strncpy((char *)lh->type, label->type, sizeof(label->type));
pvhdr = (struct pv_header *) ((void *) buf + xlate32(lh->offset_xl));
pvhdr = (struct pv_header *) ((char *) buf + xlate32(lh->offset_xl));
info = (struct lvmcache_info *) label->info;
pvhdr->device_size_xl = xlate64(info->device_size);
memcpy(pvhdr->pv_uuid, &info->dev->pvid, sizeof(struct id));
@ -266,7 +266,7 @@ static int _text_read(struct labeller *l, struct device *dev, void *buf,
char *creation_host;
struct mda_header *mdah;
pvhdr = (struct pv_header *) ((void *) buf + xlate32(lh->offset_xl));
pvhdr = (struct pv_header *) ((char *) buf + xlate32(lh->offset_xl));
if (!(info = lvmcache_add(l, (char *)pvhdr->pv_uuid, dev,
FMT_TEXT_ORPHAN_VG_NAME,