summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher/fat32format.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-17 17:52:13 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-17 17:52:13 +0000
commitd131a312668f2503546d7e1047c4a6be47ca0589 (patch)
tree9bd6582b61be4fd4af074d39a0b0c347dc8e8b6c /rbutil/ipodpatcher/fat32format.c
parent8436e29e7e618db15ae28d9ff4c16c560f18deef (diff)
downloadrockbox-d131a312668f2503546d7e1047c4a6be47ca0589.tar.gz
rockbox-d131a312668f2503546d7e1047c4a6be47ca0589.tar.bz2
rockbox-d131a312668f2503546d7e1047c4a6be47ca0589.zip
Rename variables sectorbuf and verbose to avoid clashes in rbutil. Cleanup exports a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17730 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher/fat32format.c')
-rw-r--r--rbutil/ipodpatcher/fat32format.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/rbutil/ipodpatcher/fat32format.c b/rbutil/ipodpatcher/fat32format.c
index a9417b22a2..573d3bf88a 100644
--- a/rbutil/ipodpatcher/fat32format.c
+++ b/rbutil/ipodpatcher/fat32format.c
@@ -82,7 +82,7 @@ uint32_t htole32(uint32_t x)
/* A large aligned buffer for disk I/O */
-extern unsigned char* sectorbuf;
+extern unsigned char* ipod_sectorbuf;
/* TODO: Pass these as parameters to the various create_ functions */
@@ -160,7 +160,7 @@ static int zero_sectors(struct ipod_t* ipod, uint64_t sector, int count)
return -1;
}
- memset(sectorbuf, 0, 128 * ipod->sector_size);
+ memset(ipod_sectorbuf, 0, 128 * ipod->sector_size);
/* Write 128 sectors at a time */
while (count) {
@@ -169,7 +169,7 @@ static int zero_sectors(struct ipod_t* ipod, uint64_t sector, int count)
else
n = count;
- if (ipod_write(ipod,sectorbuf,n * ipod->sector_size) < 0) {
+ if (ipod_write(ipod,ipod_sectorbuf,n * ipod->sector_size) < 0) {
perror("[ERR] Write failed in zero_sectors\n");
return -1;
}
@@ -478,15 +478,15 @@ int format_partition(struct ipod_t* ipod, int partition)
fprintf(stderr,"[INFO] Initialising reserved sectors and FATs...\n" );
/* Create the boot sector structure */
- create_boot_sector(sectorbuf, ipod, partition);
- create_fsinfo(sectorbuf + 512);
+ create_boot_sector(ipod_sectorbuf, ipod, partition);
+ create_fsinfo(ipod_sectorbuf + 512);
/* Write boot sector and fsinfo at start of partition */
if (ipod_seek(ipod, ipod->pinfo[partition].start * ipod->sector_size) < 0) {
fprintf(stderr,"[ERR] Seek failed\n");
return -1;
}
- if (ipod_write(ipod,sectorbuf,512 * 2) < 0) {
+ if (ipod_write(ipod,ipod_sectorbuf,512 * 2) < 0) {
perror("[ERR] Write failed (first copy of bootsect/fsinfo)\n");
return -1;
}
@@ -496,13 +496,13 @@ int format_partition(struct ipod_t* ipod, int partition)
fprintf(stderr,"[ERR] Seek failed\n");
return -1;
}
- if (ipod_write(ipod,sectorbuf,512 * 2) < 0) {
+ if (ipod_write(ipod,ipod_sectorbuf,512 * 2) < 0) {
perror("[ERR] Write failed (first copy of bootsect/fsinfo)\n");
return -1;
}
/* Create the first FAT sector */
- create_firstfatsector(sectorbuf);
+ create_firstfatsector(ipod_sectorbuf);
/* Write the first fat sector in the right places */
for ( i=0; i<NumFATs; i++ ) {
@@ -513,7 +513,7 @@ int format_partition(struct ipod_t* ipod, int partition)
return -1;
}
- if (ipod_write(ipod,sectorbuf,512) < 0) {
+ if (ipod_write(ipod,ipod_sectorbuf,512) < 0) {
perror("[ERR] Write failed (first copy of bootsect/fsinfo)\n");
return -1;
}