projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[tools] fix mktitanimg segfault on 64-bits hosts (#7443)
[openwrt.git]
/
tools
/
firmware-utils
/
src
/
add_header.c
diff --git
a/tools/firmware-utils/src/add_header.c
b/tools/firmware-utils/src/add_header.c
index
946068c
..
37775c3
100644
(file)
--- a/
tools/firmware-utils/src/add_header.c
+++ b/
tools/firmware-utils/src/add_header.c
@@
-122,7
+122,7
@@
int main(int argc, char **argv)
memcpy(buf, &header, sizeof(header));
// write the buf
- if ((fd = open(argv[3], O_CREAT|O_WRONLY,0644)) < 0
+ if ((fd = open(argv[3], O_CREAT|O_WRONLY
|O_TRUNC
,0644)) < 0
|| write(fd, buf, buflen) != buflen
|| close(fd) < 0)
{
This page took
0.023645 seconds
and
4
git commands to generate.