devices: Avoid using assert() to catch misconfiguration

--HG--
extra : convert_revision : 2c6710e01a4402793a2e0eafcc829df19d03dda3
This commit is contained in:
Miles Kaufmann 2007-08-30 15:16:59 -04:00
parent 54cc0053f0
commit cd890576bb

View file

@ -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);
}