Merge gblack@m5.eecs.umich.edu:/bk/multiarch
[gem5.git] / dev / disk_image.cc
index 20e693d0d566add95af8392e33853d4c1094dffc..447c54697db928f7faeb9586f0d5d54d3b8c2169 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001-2004 The Regents of The University of Michigan
+ * Copyright (c) 2001-2005 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* @file
+/** @file
  * Disk Image Definitions
  */
 
@@ -46,7 +46,7 @@
 #include "dev/disk_image.hh"
 #include "sim/builder.hh"
 #include "sim/sim_exit.hh"
-#include "targetarch/byte_swap.hh"
+#include "sim/byteswap.hh"
 
 using namespace std;
 
@@ -237,7 +237,7 @@ void
 SafeReadSwap(ifstream &stream, T &data)
 {
     SafeRead(stream, &data, sizeof(data));
-    data = htoa(data);
+    data = letoh(data); //is this the proper byte order conversion?
 }
 
 bool
@@ -319,7 +319,7 @@ template<class T>
 void
 SafeWriteSwap(ofstream &stream, const T &data)
 {
-    T swappeddata = htoa(data);
+    T swappeddata = letoh(data); //is this the proper byte order conversion?
     SafeWrite(stream, &swappeddata, sizeof(data));
 }
 void