Skip to contentSkip to conversation

creat(2) expects a creation mode parameter, not an open flag

PATCH Applied Ferenc Wagner 2 participants 2 messages Mar 7, 2010 – Apr 1, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 creat(2) expects a creation mode parameter, not an open flag

---
 mtd_debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mtd_debug.c +1 -1
index 85d48e9..49a4567 100644
@@ -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()");
Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 1 line · Ferenc Wagner

creat(2) expects a creation mode parameter, not an open flag

Pushed to the mtd-utils tree, thanks.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)