summaryrefslogtreecommitdiffstats
path: root/src/fatp.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/fatp.c
parent9970a484b6983cbf5659ebf17335b4192065025e (diff)
Use pread() and pwrite() argument style for internal I/O
Diffstat (limited to 'src/fatp.c')
-rw-r--r--src/fatp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fatp.c b/src/fatp.c
index 5f90309..32f627c 100644
--- a/src/fatp.c
+++ b/src/fatp.c
@@ -57,7 +57,7 @@ static void fat16_remove_used_space(disk_t *disk_car,const partition_t *partitio
offset_o=prev_cluster%(sector_size/2);
if((offset_o==0)||(prev_cluster==2))
{
- if(disk_car->read(disk_car, sector_size, buffer, hd_offset)!=0)
+ if(disk_car->pread(disk_car, buffer, sector_size, hd_offset) != sector_size)
{
/* Consider these FAT sectors points to free clusters */
}
@@ -100,7 +100,7 @@ static void fat32_remove_used_space(disk_t *disk_car,const partition_t *partitio
offset_o=prev_cluster%(sector_size/4);
if((offset_o==0)||(prev_cluster==2))
{
- if(disk_car->read(disk_car,sector_size, buffer, hd_offset)!=0)
+ if(disk_car->pread(disk_car, buffer, sector_size, hd_offset) != sector_size)
{
/* Consider these FAT sectors points to free clusters */
}
@@ -139,7 +139,7 @@ unsigned int fat_remove_used_space(disk_t *disk_car, const partition_t *partitio
const struct fat_boot_sector *fat_header;
buffer=(unsigned char *)MALLOC(3*disk_car->sector_size);
fat_header=(const struct fat_boot_sector *)buffer;
- if(disk_car->read(disk_car,3*disk_car->sector_size, buffer, partition->part_offset)!=0)
+ if(disk_car->pread(disk_car, buffer, 3 * disk_car->sector_size, partition->part_offset) != 3 * disk_car->sector_size)
{
free(buffer);
return 0;