diff --git a/src/jtag/drivers/remote_bitbang.c b/src/jtag/drivers/remote_bitbang.c index 7517b68db..9812a7ee2 100644 --- a/src/jtag/drivers/remote_bitbang.c +++ b/src/jtag/drivers/remote_bitbang.c @@ -288,7 +288,7 @@ static int remote_bitbang_init(void) if (remote_bitbang_fd < 0) return remote_bitbang_fd; - remote_bitbang_file = fdopen(remote_bitbang_fd, "w"); + remote_bitbang_file = fdopen(remote_bitbang_fd, "w+"); if (remote_bitbang_file == NULL) { LOG_ERROR("fdopen: failed to open write stream"); close(remote_bitbang_fd);