From 4f8c7a0e925c904b37f590b2513824c6d6bba85f Mon Sep 17 00:00:00 2001 From: Ferenc Wagner Date: Sun, 7 Mar 2010 22:15:58 +0100 Subject: mtd_debug: fix creation mode parameter creat(2) expects a creation mode parameter, not an open flag. Signed-off-by: Ferenc Wagner Signed-off-by: Artem Bityutskiy --- mtd_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()"); -- cgit v1.2.3