gem5  v20.0.0.3
Classes | Functions
disk_image.cc File Reference

Disk Image Definitions. More...

#include "dev/storage/disk_image.hh"
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <cerrno>
#include <cstring>
#include <fstream>
#include <string>
#include "base/callback.hh"
#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/DiskImageRead.hh"
#include "debug/DiskImageWrite.hh"
#include "sim/byteswap.hh"
#include "sim/sim_exit.hh"

Go to the source code of this file.

Classes

class  CowDiskCallback
 

Functions

void SafeRead (ifstream &stream, void *data, int count)
 
template<class T >
void SafeRead (ifstream &stream, T &data)
 
template<class T >
void SafeReadSwap (ifstream &stream, T &data)
 
void SafeWrite (ofstream &stream, const void *data, int count)
 
template<class T >
void SafeWrite (ofstream &stream, const T &data)
 
template<class T >
void SafeWriteSwap (ofstream &stream, const T &data)
 

Detailed Description

Disk Image Definitions.

Definition in file disk_image.cc.

Function Documentation

◆ SafeRead() [1/2]

void SafeRead ( ifstream &  stream,
void *  data,
int  count 
)

Definition at line 220 of file disk_image.cc.

References panic.

Referenced by CowDiskImage::open(), SafeRead(), and SafeReadSwap().

◆ SafeRead() [2/2]

template<class T >
void SafeRead ( ifstream &  stream,
T &  data 
)

Definition at line 235 of file disk_image.cc.

References SafeRead().

◆ SafeReadSwap()

template<class T >
void SafeReadSwap ( ifstream &  stream,
T &  data 
)

Definition at line 242 of file disk_image.cc.

References letoh(), and SafeRead().

Referenced by CowDiskImage::open().

◆ SafeWrite() [1/2]

void SafeWrite ( ofstream &  stream,
const void *  data,
int  count 
)

Definition at line 303 of file disk_image.cc.

References panic.

Referenced by SafeWrite(), SafeWriteSwap(), and CowDiskImage::save().

◆ SafeWrite() [2/2]

template<class T >
void SafeWrite ( ofstream &  stream,
const T &  data 
)

Definition at line 318 of file disk_image.cc.

References SafeWrite().

◆ SafeWriteSwap()

template<class T >
void SafeWriteSwap ( ofstream &  stream,
const T &  data 
)

Definition at line 325 of file disk_image.cc.

References letoh(), and SafeWrite().

Referenced by CowDiskImage::save().


Generated on Fri Jul 3 2020 15:53:08 for gem5 by doxygen 1.8.13