diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index f334bcb0..2df0f971 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -8141,6 +8141,15 @@ static void exit_main(void) brick_msleep(1000); } +static noinline +void ensure_actual(char *peer) +{ + char *actual_dir = path_make("/mars/actual-%s", peer); + + (void)mars_mkdir(actual_dir); + brick_string_free(actual_dir); +} + static int __init init_main(void) { #if defined(MARS_HAS_PREPATCH) || \ @@ -8237,6 +8246,11 @@ static int __init init_main(void) brick_mem_reserve(); #endif + /* Ensure that the bare minimum is present, even when + * userspace support is missing. + */ + ensure_actual(my_id()); + status = compute_emergency_mode(); if (unlikely(status < 0)) { MARS_ERR("Sorry, your /mars/ filesystem is too small!\n");