Kernel: Don't print error if `root` is empty
This is used when loading filesystem from initrd
This commit is contained in:
parent
d27891c79f
commit
7a054787ca
|
@ -61,7 +61,7 @@ namespace Kernel
|
||||||
if (filesystem_or_error.is_error())
|
if (filesystem_or_error.is_error())
|
||||||
panic("Failed to create fallback filesystem: {}", filesystem_or_error.error());
|
panic("Failed to create fallback filesystem: {}", filesystem_or_error.error());
|
||||||
|
|
||||||
dwarnln("Attempting to load fallback filesystem from {} modules", g_boot_info.modules.size());
|
dprintln("Loading fallback filesystem from {} modules", g_boot_info.modules.size());
|
||||||
|
|
||||||
auto filesystem = BAN::RefPtr<FileSystem>::adopt(filesystem_or_error.release_value());
|
auto filesystem = BAN::RefPtr<FileSystem>::adopt(filesystem_or_error.release_value());
|
||||||
|
|
||||||
|
@ -78,6 +78,9 @@ namespace Kernel
|
||||||
|
|
||||||
static BAN::RefPtr<FileSystem> load_root_filesystem(BAN::StringView root_path)
|
static BAN::RefPtr<FileSystem> load_root_filesystem(BAN::StringView root_path)
|
||||||
{
|
{
|
||||||
|
if (root_path.empty())
|
||||||
|
return load_fallback_root_filesystem();
|
||||||
|
|
||||||
enum class RootType
|
enum class RootType
|
||||||
{
|
{
|
||||||
PartitionUUID,
|
PartitionUUID,
|
||||||
|
|
Loading…
Reference in New Issue