compile fix for posix

This commit is contained in:
folkert van heusden 2024-05-09 17:33:36 +02:00
parent 05a3e0224b
commit 6c73bb779d
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -80,6 +80,9 @@ std::optional<disk_backend *> select_nbd_server(console *const cnsl)
void start_disk(console *const cnsl) void start_disk(console *const cnsl)
{ {
#if IS_POSIX
return;
#else
static bool disk_started = false; static bool disk_started = false;
if (disk_started) if (disk_started)
return; return;
@ -108,6 +111,7 @@ void start_disk(console *const cnsl)
cnsl->put_string_lf("Failed to initialize SD card"); cnsl->put_string_lf("Failed to initialize SD card");
} }
#endif #endif
#endif
} }
void ls_l(console *const cnsl) void ls_l(console *const cnsl)
@ -118,7 +122,7 @@ void ls_l(console *const cnsl)
DIR *dir = opendir("."); DIR *dir = opendir(".");
if (!dir) { if (!dir) {
cnsl->put_string_lf("Cannot access directory"); cnsl->put_string_lf("Cannot access directory");
return { }; return;
} }
dirent *dr = nullptr; dirent *dr = nullptr;