From cb68460c0df6217c51cfe1272576dad8a304c0dd Mon Sep 17 00:00:00 2001 From: Will Sowerbutts Date: Fri, 6 Jan 2017 19:22:50 +0000 Subject: [PATCH] Kernel: fmount: Return failure instead of panicking when a device cannot be opened. --- Kernel/filesys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/filesys.c b/Kernel/filesys.c index 678755d2..48be4fcc 100644 --- a/Kernel/filesys.c +++ b/Kernel/filesys.c @@ -1106,7 +1106,7 @@ bool fmount(uint16_t dev, inoptr ino, uint16_t flags) struct filesys *fp; if(d_open(dev, 0) != 0) - panic(PANIC_FMOUNT_NOPEN); + return true; /* Bad device */ m = newfstab(); if (m == NULL) { -- 2.34.1