diff options
| author | Roy Marples <roy@marples.name> | 2017-04-14 10:17:27 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-04-14 10:17:27 +0100 |
| commit | 5b3c46078bfc06d2a14f29dc5b5bf482adf2d52e (patch) | |
| tree | 1986f44ccd2b6edfd9a12fa9efe1e2ccdce50f50 /compat | |
| parent | 7085ee9a8d8462a7bc65a938042cc6ed0dacf61e (diff) | |
| download | dhcpcd-5b3c46078bfc06d2a14f29dc5b5bf482adf2d52e.tar.xz | |
dprintf should append, not truncate.
Diffstat (limited to 'compat')
| -rw-r--r-- | compat/dprintf.c | 5 | ||||
| -rw-r--r-- | compat/dprintf.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/compat/dprintf.c b/compat/dprintf.c index 610a8f0b..2ef81ade 100644 --- a/compat/dprintf.c +++ b/compat/dprintf.c @@ -1,6 +1,6 @@ /* * dhcpcd - DHCP client daemon - * Copyright (c) 2006-2014 Roy Marples <roy@marples.name> + * Copyright (c) 2006-2017 Roy Marples <roy@marples.name> * All rights reserved * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ vdprintf(int fd, const char * __restrict fmt, va_list va) if ((e = dup(fd)) == -1) return -1; - if ((fp = fdopen(e, "w")) == NULL) { + if ((fp = fdopen(e, "a")) == NULL) { close(e); return -1; } @@ -62,4 +62,3 @@ dprintf(int fd, const char * __restrict fmt, ...) va_end(va); return e; } - diff --git a/compat/dprintf.h b/compat/dprintf.h index b8cd4971..9defbcb8 100644 --- a/compat/dprintf.h +++ b/compat/dprintf.h @@ -1,6 +1,6 @@ /* * dhcpcd - DHCP client daemon - * Copyright (c) 2006-2014 Roy Marples <roy@marples.name> + * Copyright (c) 2006-2017 Roy Marples <roy@marples.name> * All rights reserved * Redistribution and use in source and binary forms, with or without |
