summaryrefslogtreecommitdiffstats
path: root/src/lvm.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-01-31 17:07:08 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-01-31 17:07:08 +0100
commit56d98fd7a229c8839a364a8a194c89c8fa650fff (patch)
treefabc87d58b2ea35831496d5f9762f6b64b481072 /src/lvm.c
parent9970a484b6983cbf5659ebf17335b4192065025e (diff)
Use pread() and pwrite() argument style for internal I/O
Diffstat (limited to 'src/lvm.c')
-rw-r--r--src/lvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lvm.c b/src/lvm.c
index 58df7e6..7acce61 100644
--- a/src/lvm.c
+++ b/src/lvm.c
@@ -46,7 +46,7 @@ static int test_LVM2(disk_t *disk_car, const struct lvm2_label_header *lh,partit
int check_LVM(disk_t *disk_car,partition_t *partition,const int verbose)
{
unsigned char *buffer=(unsigned char*)MALLOC(LVM_PV_DISK_SIZE);
- if(disk_car->read(disk_car,LVM_PV_DISK_SIZE, buffer, partition->part_offset)!=0)
+ if(disk_car->pread(disk_car, buffer, LVM_PV_DISK_SIZE, partition->part_offset) != LVM_PV_DISK_SIZE)
{
free(buffer);
return 1;
@@ -130,7 +130,7 @@ static int set_LVM_info(partition_t *partition, const pv_disk_t *pv)
int check_LVM2(disk_t *disk_car,partition_t *partition,const int verbose)
{
unsigned char *buffer=(unsigned char *)MALLOC(DEFAULT_SECTOR_SIZE);
- if(disk_car->read(disk_car,DEFAULT_SECTOR_SIZE, buffer, partition->part_offset+0x200)!=0)
+ if(disk_car->pread(disk_car, buffer, DEFAULT_SECTOR_SIZE, partition->part_offset + 0x200) != DEFAULT_SECTOR_SIZE)
{
free(buffer);
return 1;