mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
Kernel: Remove use of copy_ref() in favor of regular RefPtr copies.
This is obviously more readable. If we ever run into a situation where ref count churn is actually causing trouble in the future, we can deal with it then. For now, let's keep it simple. :^)
This commit is contained in:
parent
560d037c41
commit
5254a320d8
14 changed files with 34 additions and 34 deletions
|
@ -86,7 +86,7 @@ VFS* vfs;
|
|||
|
||||
auto dev_hd0 = IDEDiskDevice::create(IDEDiskDevice::DriveType::MASTER);
|
||||
|
||||
NonnullRefPtr<DiskDevice> root_dev = dev_hd0.copy_ref();
|
||||
NonnullRefPtr<DiskDevice> root_dev = dev_hd0;
|
||||
|
||||
root = root.substring(strlen("/dev/hda"), root.length() - strlen("/dev/hda"));
|
||||
|
||||
|
@ -104,7 +104,7 @@ VFS* vfs;
|
|||
hang();
|
||||
}
|
||||
|
||||
MBRPartitionTable mbr(root_dev.copy_ref());
|
||||
MBRPartitionTable mbr(root_dev);
|
||||
if (!mbr.initialize()) {
|
||||
kprintf("init_stage2: couldn't read MBR from disk\n");
|
||||
hang();
|
||||
|
@ -119,13 +119,13 @@ VFS* vfs;
|
|||
root_dev = *partition;
|
||||
}
|
||||
|
||||
auto e2fs = Ext2FS::create(root_dev.copy_ref());
|
||||
auto e2fs = Ext2FS::create(root_dev);
|
||||
if (!e2fs->initialize()) {
|
||||
kprintf("init_stage2: couldn't open root filesystem\n");
|
||||
hang();
|
||||
}
|
||||
|
||||
vfs->mount_root(e2fs.copy_ref());
|
||||
vfs->mount_root(e2fs);
|
||||
|
||||
dbgprintf("Load ksyms\n");
|
||||
load_ksyms();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue