From: Miles Kaufmann Date: Thu, 30 Aug 2007 19:16:59 +0000 (-0400) Subject: devices: Avoid using assert() to catch misconfiguration X-Git-Tag: m5_2.0_beta4~140 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd890576bb21d513c79aa6f9ac6e61e93dbb2965;p=gem5.git devices: Avoid using assert() to catch misconfiguration --HG-- extra : convert_revision : 2c6710e01a4402793a2e0eafcc829df19d03dda3 --- 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); }