diff options
author | Dave Chapman <dave@dchapman.com> | 2007-01-29 20:17:59 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2007-01-29 20:17:59 +0000 |
commit | 1bb3d2601f6198f945f6a8b5852579881f63072a (patch) | |
tree | 92e171e1d9a232c73ef67a838ecacb6bc6d639df /tools | |
parent | 6be7727ac39d043b135fec665373e90926dd5a5b (diff) | |
download | rockbox-1bb3d2601f6198f945f6a8b5852579881f63072a.tar.gz rockbox-1bb3d2601f6198f945f6a8b5852579881f63072a.zip |
Minor bugfix - use O_TRUNC when reading the firmware partition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12150 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ipodpatcher/ipodpatcher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ipodpatcher/ipodpatcher.c b/tools/ipodpatcher/ipodpatcher.c index 29a5939cea..28cac87c6c 100644 --- a/tools/ipodpatcher/ipodpatcher.c +++ b/tools/ipodpatcher/ipodpatcher.c @@ -1388,7 +1388,7 @@ int main(int argc, char* argv[]) fprintf(stderr,"[ERR] --read-firmware failed.\n"); } } else if (action==READ_PARTITION) { - outfile = open(filename,O_CREAT|O_WRONLY|O_BINARY,S_IREAD|S_IWRITE); + outfile = open(filename,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,S_IREAD|S_IWRITE); if (outfile < 0) { perror(filename); return 4; |