projects
/
dosdemo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e546fc
)
added missing open flags and mode in init_logger
author
John Tsiombikas
<nuclear@mutantstargoat.com>
Tue, 4 Oct 2016 05:09:09 +0000
(08:09 +0300)
committer
John Tsiombikas
<nuclear@mutantstargoat.com>
Tue, 4 Oct 2016 05:09:09 +0000
(08:09 +0300)
src/dos/logger.c
patch
|
blob
|
history
diff --git
a/src/dos/logger.c
b/src/dos/logger.c
index
f7e9256
..
70489ad
100644
(file)
--- a/
src/dos/logger.c
+++ b/
src/dos/logger.c
@@
-8,7
+8,7
@@
int init_logger(const char *fname)
{
int fd;
int init_logger(const char *fname)
{
int fd;
- if((fd = open(fname, O_WRONLY)) == -1) {
+ if((fd = open(fname, O_CREAT | O_WRONLY | O_TRUNC, 0644)) == -1) {
fprintf(stderr, "init_logger: failed to open %s: %s\n", fname, strerror(errno));
return -1;
}
fprintf(stderr, "init_logger: failed to open %s: %s\n", fname, strerror(errno));
return -1;
}