Move mounting the shared_memory ramfs to launch_daemon.
The directory is created there, so we should also perform the mount operation there. If we don't, the first boot of a new Haiku image will not have the ramfs shared_memory, since of course the kernel can't mount it at a nonexistent directory.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
//! Empty main temporary directory
|
||||
|
||||
|
||||
#include <fs_volume.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user