From cd890576bb21d513c79aa6f9ac6e61e93dbb2965 Mon Sep 17 00:00:00 2001 From: Miles Kaufmann Date: Thu, 30 Aug 2007 15:16:59 -0400 Subject: [PATCH] devices: Avoid using assert() to catch misconfiguration --HG-- extra : convert_revision : 2c6710e01a4402793a2e0eafcc829df19d03dda3 --- src/dev/disk_image.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.30.2