diff --git a/src/servers/launch/InitSharedMemoryDirectoryJob.cpp b/src/servers/launch/InitSharedMemoryDirectoryJob.cpp index 00423dcb3b..f7d51715e2 100644 --- a/src/servers/launch/InitSharedMemoryDirectoryJob.cpp +++ b/src/servers/launch/InitSharedMemoryDirectoryJob.cpp @@ -7,6 +7,8 @@ //! Empty main temporary directory +#include + #include "InitSharedMemoryDirectoryJob.h" @@ -20,5 +22,12 @@ InitSharedMemoryDirectoryJob::InitSharedMemoryDirectoryJob() status_t InitSharedMemoryDirectoryJob::Execute() { - return CreateAndEmpty("/var/shared_memory"); + status_t status = CreateAndEmpty("/var/shared_memory"); + if (status != B_OK) + return status; + + status = fs_mount_volume("/var/shared_memory", NULL, "ramfs", 0, NULL); + if (status < B_OK) + return status; + return B_OK; } diff --git a/src/system/kernel/fs/vfs_boot.cpp b/src/system/kernel/fs/vfs_boot.cpp index 504d38f42f..45e7fb785a 100644 --- a/src/system/kernel/fs/vfs_boot.cpp +++ b/src/system/kernel/fs/vfs_boot.cpp @@ -555,10 +555,6 @@ vfs_mount_boot_file_system(kernel_args* args) } } - status = _kern_mount("/boot/system/var/shared_memory", NULL, "ramfs", 0, NULL, 0); - if (status < B_OK) - dprintf("Failed to mount shared memory FS: %s\n", strerror(status)); - // Now that packagefs is mounted, the boot volume is really ready. gBootDevice = bootDevice;