From b0c25d723f9b3904fb4171ea16b3de3b343704d0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Wed, 10 Oct 2007 21:07:52 +0000 Subject: [PATCH] rename map_partition_read and map_partition_write to map_read_sector and map_write_sector --- libmap/map_bootblock_read.c | 2 +- libmap/map_bootblock_write.c | 2 +- libmap/map_read_sector.c | 2 +- libmap/map_write_sector.c | 2 +- tools/emile-map-set.c | 7 +++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libmap/map_bootblock_read.c b/libmap/map_bootblock_read.c index 9cdf11a..72d91c2 100644 --- a/libmap/map_bootblock_read.c +++ b/libmap/map_bootblock_read.c @@ -14,5 +14,5 @@ int map_bootblock_read(map_t* map, char* bootblock) { - return map_partition_read(map, 0, BOOTBLOCK_SIZE, bootblock); + return map_read_sector(map, 0, bootblock, BOOTBLOCK_SIZE); } diff --git a/libmap/map_bootblock_write.c b/libmap/map_bootblock_write.c index 627dcf6..b911334 100644 --- a/libmap/map_bootblock_write.c +++ b/libmap/map_bootblock_write.c @@ -14,5 +14,5 @@ int map_bootblock_write(map_t* map, char* bootblock) { - return map_partition_write(map, 0, BOOTBLOCK_SIZE, bootblock); + return map_write_sector(map, 0, bootblock, BOOTBLOCK_SIZE); } diff --git a/libmap/map_read_sector.c b/libmap/map_read_sector.c index 137d14d..9b489b4 100644 --- a/libmap/map_read_sector.c +++ b/libmap/map_read_sector.c @@ -21,7 +21,7 @@ int map_read_sector(map_t* map, off_t offset, char *buffer, size_t size) offset += read_long((u_int32_t*)&map->partition.PyPartStart); - ret = map->device->read_sector(map->device->data, offset, sector, size); + ret = map->device->read_sector(map->device->data, offset, buffer, size); return ret; } diff --git a/libmap/map_write_sector.c b/libmap/map_write_sector.c index 46bcc34..5981e64 100644 --- a/libmap/map_write_sector.c +++ b/libmap/map_write_sector.c @@ -21,7 +21,7 @@ int map_write_sector(map_t* map, off_t offset, char *buffer, size_t size) offset += read_long((u_int32_t*)&map->partition.PyPartStart); - ret = map->device->write_sector(map->device->data, offset, sector, size); + ret = map->device->write_sector(map->device->data, offset, buffer, size); return ret; } diff --git a/tools/emile-map-set.c b/tools/emile-map-set.c index 095e6be..5d4fb97 100644 --- a/tools/emile-map-set.c +++ b/tools/emile-map-set.c @@ -154,8 +154,7 @@ static int get_driver(map_t *map, int partition, char* appledriver) return -1; } - ret = map_partition_read(map, block * block_size, bootsize, - (char*)code); + ret = map_read_sector(map, block * block_size, (char*)code, bootsize); if (ret == -1) { fprintf(stderr, "ERROR: cannot read driver (read())\n"); @@ -260,8 +259,8 @@ static int put_driver(map_t *map, int partition, char* appledriver) /* write file in partition */ - ret = map_partition_write(map, block * block_size, st.st_size, - (char*)code); + ret = map_write_sector(map, block * block_size, (char*)code, + st.st_size); free(code); if (ret == -1)