aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-22 00:51:44 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-22 00:51:44 +0000
commit61ca1de73aa68962b03cd954eeac560bf5287b05 (patch)
treed610e9cbfaaf9e3fde708656dc70c3c0a9228aa5 /sim
parentcbc0188bd642a04bcb1db12db8a2a8af248725b3 (diff)
downloadgdb-61ca1de73aa68962b03cd954eeac560bf5287b05.zip
gdb-61ca1de73aa68962b03cd954eeac560bf5287b05.tar.gz
gdb-61ca1de73aa68962b03cd954eeac560bf5287b05.tar.bz2
2003-06-21 Andrew Cagney <cagney@redhat.com>
* hw_com.c (hw_com_device_init_data): Check that the output, and not input file opened. Pointed out by masahino tky3.3web.ne.jp.
Diffstat (limited to 'sim')
-rw-r--r--sim/ppc/ChangeLog5
-rw-r--r--sim/ppc/hw_com.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index a9bc004..7b10055 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-21 Andrew Cagney <cagney@redhat.com>
+
+ * hw_com.c (hw_com_device_init_data): Check that the output, and
+ not input file opened. Pointed out by masahino tky3.3web.ne.jp.
+
2003-06-20 Andrew Cagney <cagney@redhat.com>
* sim_calls.c (sim_create_inferior): Assert that
diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
index 4362322..ff8afe7 100644
--- a/sim/ppc/hw_com.c
+++ b/sim/ppc/hw_com.c
@@ -249,7 +249,7 @@ hw_com_device_init_data(device *me)
if (device_find_property(me, "output-file") != NULL) {
const char *output_file = device_find_string_property(me, "output-file");
com->output.file = fopen(output_file, "w");
- if (com->input.file == NULL)
+ if (com->output.file == NULL)
device_error(me, "Problem opening output file %s\n", output_file);
if (device_find_property(me, "output-buffering") != NULL) {
const char *buffering = device_find_string_property(me, "output-buffering");