diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-05-10 17:48:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-05-10 17:48:10 +0000 |
commit | d4481806706a96409801815f4a1fa105e767788b (patch) | |
tree | af757520225f4015f6798f869425a2b3e01c4dcb /sim/ppc/hw_init.c | |
parent | f7635dd9207587ecb51370172ac20016fa30c1dc (diff) | |
download | gdb-d4481806706a96409801815f4a1fa105e767788b.zip gdb-d4481806706a96409801815f4a1fa105e767788b.tar.gz gdb-d4481806706a96409801815f4a1fa105e767788b.tar.bz2 |
Don't loose last block during a dma.
Diffstat (limited to 'sim/ppc/hw_init.c')
-rw-r--r-- | sim/ppc/hw_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/ppc/hw_init.c b/sim/ppc/hw_init.c index b486f6f..86e753c 100644 --- a/sim/ppc/hw_init.c +++ b/sim/ppc/hw_init.c @@ -47,7 +47,7 @@ dma_file(device *me, count = 0; while (1) { inc = fread(buf, 1, sizeof(buf), image); - if (feof(image) || ferror(image)) + if (inc <= 0) break; if (device_dma_write_buffer(device_parent(me), buf, |