devices: Avoid using assert() to catch misconfiguration
--HG-- extra : convert_revision : 2c6710e01a4402793a2e0eafcc829df19d03dda3
This commit is contained in:
parent
54cc0053f0
commit
cd890576bb
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue