From 7d8bbe71b66100040c4d5453f7fc2a7a1665b599 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Wed, 13 Nov 2002 23:25:46 +0000 Subject: creat() now includes the O_TRUNC flag. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2846 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/common') diff --git a/firmware/common/file.c b/firmware/common/file.c index 177635d0be..504273fd67 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c @@ -54,7 +54,7 @@ static int flush_cache(int fd); int creat(const char *pathname, int mode) { (void)mode; - return open(pathname, O_WRONLY|O_CREAT); + return open(pathname, O_WRONLY|O_CREAT|O_TRUNC); } int open(const char* pathname, int flags) -- cgit v1.2.3