[PATCH, mtd-utils] creat(2) expects a creation mode parameter, not an open flag
Ferenc Wagner
wferi at niif.hu
Sun Mar 7 16:15:58 EST 2010
Signed-off-by: Ferenc Wagner <wferi at niif.hu>
---
mtd_debug.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mtd_debug.c b/mtd_debug.c
index 85d48e9..49a4567 100644
--- a/mtd_debug.c
+++ b/mtd_debug.c
@@ -110,7 +110,7 @@ int flash_to_file (int fd,u_int32_t offset,size_t len,const char *filename)
perror ("lseek()");
goto err0;
}
- outfd = creat (filename,O_WRONLY);
+ outfd = creat (filename,0666);
if (outfd < 0)
{
perror ("creat()");
--
1.5.6.5
More information about the linux-mtd
mailing list