changeset 112382ddf96d in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=112382ddf96d
description:
        Merged c22628fa2564 and 2285b98847d7

diffstat:

 src/dev/disk_image.cc |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 2285b98847d7 -r 112382ddf96d src/dev/disk_image.cc
--- a/src/dev/disk_image.cc     Wed Apr 17 16:07:19 2013 -0500
+++ b/src/dev/disk_image.cc     Wed Apr 17 16:09:37 2013 -0500
@@ -108,7 +108,8 @@
     if (!stream.is_open())
         panic("file not open!\n");
 
-    if (stream.seekg(offset * SectorSize, ios::beg) < 0)
+    stream.seekg(offset * SectorSize, ios::beg);
+    if (!stream.good())
         panic("Could not seek to location in file");
 
     streampos pos = stream.tellg();
@@ -132,7 +133,8 @@
     if (!stream.is_open())
         panic("file not open!\n");
 
-    if (stream.seekp(offset * SectorSize, ios::beg) < 0)
+    stream.seekp(offset * SectorSize, ios::beg);
+    if (!stream.good())
         panic("Could not seek to location in file");
 
     DPRINTF(DiskImageWrite, "write: offset=%d\n", (uint64_t)offset);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to