summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiles Kaufmann <milesck@eecs.umich.edu>2007-08-30 15:16:59 -0400
committerMiles Kaufmann <milesck@eecs.umich.edu>2007-08-30 15:16:59 -0400
commitcd890576bb21d513c79aa6f9ac6e61e93dbb2965 (patch)
tree6d5a685ad6d720505d3b3c500f8e1957bdc07b3b /src
parent54cc0053f0a6822e47a49771976af6daaabc24bb (diff)
downloadgem5-cd890576bb21d513c79aa6f9ac6e61e93dbb2965.tar.xz
devices: Avoid using assert() to catch misconfiguration
--HG-- extra : convert_revision : 2c6710e01a4402793a2e0eafcc829df19d03dda3
Diffstat (limited to 'src')
-rw-r--r--src/dev/disk_image.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dev/disk_image.cc b/src/dev/disk_image.cc
index b8386bc3d..792a31204 100644
--- a/src/dev/disk_image.cc
+++ b/src/dev/disk_image.cc
@@ -171,7 +171,8 @@ CowDiskImage::CowDiskImage(const Params *p)
init(p->table_size);
} else {
if (!open(filename)) {
- assert(!p->read_only && "why have a non-existent read only file?");
+ if (p->read_only)
+ fatal("could not open read-only file");
init(p->table_size);
}