firmware-utils/mktplinkfw: add support for TL-WR703N v1
[openwrt.git] / tools / firmware-utils / src / add_header.c
index 946068c..37775c3 100644 (file)
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
        memcpy(buf, &header, sizeof(header));
 
        // write the buf
        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)
        {
        || write(fd, buf, buflen) != buflen
        || close(fd) < 0)
        {
This page took 0.026659 seconds and 4 git commands to generate.