]> www.infradead.org Git - mtd-utils.git/commitdiff
mtd_debug: fix creation mode parameter
authorFerenc Wagner <wferi@niif.hu>
Sun, 7 Mar 2010 21:15:58 +0000 (22:15 +0100)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 1 Apr 2010 12:51:17 +0000 (15:51 +0300)
creat(2) expects a creation mode parameter, not an open flag.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
mtd_debug.c

index 85d48e924972f8dc0fd76c5a71b050c751b50c83..49a45676cc8f166059f1a9a9cdc0859f75c488ff 100644 (file)
@@ -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()");