From 4f075ae3b3eaae997c75c5e875f6ef833949458f Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 22 Mar 2009 21:28:46 +0000 Subject: [PATCH] bug #25971: "error writing to " with multiple -U params. * fileio.c: Do not close the input/output stream when working on an stdio stream. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@816 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/ChangeLog | 6 ++++++ avrdude/fileio.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index 70abf712..a35164e1 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,9 @@ +2009-03-22 Joerg Wunsch + + bug #25971: "error writing to " with multiple -U params. + * fileio.c: Do not close the input/output stream when working on an + stdio stream. + 2009-02-28 Thomas Fischl Based on patch #6484 commited by Jurgis Brigmanis: diff --git a/avrdude/fileio.c b/avrdude/fileio.c index 60975c02..11905fe3 100644 --- a/avrdude/fileio.c +++ b/avrdude/fileio.c @@ -1150,7 +1150,7 @@ int fileio(int op, char * filename, FILEFMT format, rc = avr_mem_hiaddr(mem); } } - if (format != FMT_IMM) { + if (format != FMT_IMM && !using_stdio) { fclose(f); } return rc;