mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
This commit is contained in:
parent
77b9fa89dd
commit
90b1354688
188 changed files with 562 additions and 562 deletions
|
@ -2,12 +2,12 @@
|
|||
|
||||
// #define OFFD_DEBUG
|
||||
|
||||
Retained<DiskPartition> DiskPartition::create(Retained<DiskDevice>&& device, unsigned block_offset)
|
||||
NonnullRefPtr<DiskPartition> DiskPartition::create(NonnullRefPtr<DiskDevice>&& device, unsigned block_offset)
|
||||
{
|
||||
return adopt(*new DiskPartition(move(device), block_offset));
|
||||
}
|
||||
|
||||
DiskPartition::DiskPartition(Retained<DiskDevice>&& device, unsigned block_offset)
|
||||
DiskPartition::DiskPartition(NonnullRefPtr<DiskDevice>&& device, unsigned block_offset)
|
||||
: m_device(move(device))
|
||||
, m_block_offset(block_offset)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
class DiskPartition final : public DiskDevice {
|
||||
public:
|
||||
static Retained<DiskPartition> create(Retained<DiskDevice>&& device, unsigned block_offset);
|
||||
static NonnullRefPtr<DiskPartition> create(NonnullRefPtr<DiskDevice>&& device, unsigned block_offset);
|
||||
virtual ~DiskPartition();
|
||||
|
||||
virtual unsigned block_size() const override;
|
||||
|
@ -17,8 +17,8 @@ public:
|
|||
private:
|
||||
virtual const char* class_name() const override;
|
||||
|
||||
DiskPartition(Retained<DiskDevice>&&, unsigned);
|
||||
DiskPartition(NonnullRefPtr<DiskDevice>&&, unsigned);
|
||||
|
||||
Retained<DiskDevice> m_device;
|
||||
NonnullRefPtr<DiskDevice> m_device;
|
||||
unsigned m_block_offset;
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//#define FBBD_DEBUG
|
||||
#define IGNORE_FILE_LENGTH // Useful for e.g /dev/hda2
|
||||
|
||||
RetainPtr<FileBackedDiskDevice> FileBackedDiskDevice::create(String&& image_path, unsigned block_size)
|
||||
RefPtr<FileBackedDiskDevice> FileBackedDiskDevice::create(String&& image_path, unsigned block_size)
|
||||
{
|
||||
return adopt(*new FileBackedDiskDevice(move(image_path), block_size));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
class FileBackedDiskDevice final : public DiskDevice {
|
||||
public:
|
||||
static RetainPtr<FileBackedDiskDevice> create(String&& image_path, unsigned block_size);
|
||||
static RefPtr<FileBackedDiskDevice> create(String&& image_path, unsigned block_size);
|
||||
virtual ~FileBackedDiskDevice() override;
|
||||
|
||||
bool is_valid() const { return m_file; }
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
#define ATA_REG_ALTSTATUS 0x0C
|
||||
#define ATA_REG_DEVADDRESS 0x0D
|
||||
|
||||
Retained<IDEDiskDevice> IDEDiskDevice::create()
|
||||
NonnullRefPtr<IDEDiskDevice> IDEDiskDevice::create()
|
||||
{
|
||||
return adopt(*new IDEDiskDevice);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class IDEDiskDevice final : public IRQHandler
|
|||
, public DiskDevice {
|
||||
AK_MAKE_ETERNAL
|
||||
public:
|
||||
static Retained<IDEDiskDevice> create();
|
||||
static NonnullRefPtr<IDEDiskDevice> create();
|
||||
virtual ~IDEDiskDevice() override;
|
||||
|
||||
// ^DiskDevice
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
|
||||
PCI::Address m_pci_address;
|
||||
PhysicalRegionDescriptor m_prdt;
|
||||
RetainPtr<PhysicalPage> m_dma_buffer_page;
|
||||
RefPtr<PhysicalPage> m_dma_buffer_page;
|
||||
word m_bus_master_base { 0 };
|
||||
Lockable<bool> m_dma_enabled;
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#define MBR_DEBUG
|
||||
|
||||
MBRPartitionTable::MBRPartitionTable(Retained<DiskDevice>&& device)
|
||||
MBRPartitionTable::MBRPartitionTable(NonnullRefPtr<DiskDevice>&& device)
|
||||
: m_device(move(device))
|
||||
{
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ bool MBRPartitionTable::initialize()
|
|||
return true;
|
||||
}
|
||||
|
||||
RetainPtr<DiskPartition> MBRPartitionTable::partition(unsigned index)
|
||||
RefPtr<DiskPartition> MBRPartitionTable::partition(unsigned index)
|
||||
{
|
||||
ASSERT(index >= 1 && index <= 4);
|
||||
|
||||
|
|
|
@ -31,14 +31,14 @@ class MBRPartitionTable {
|
|||
AK_MAKE_ETERNAL
|
||||
|
||||
public:
|
||||
MBRPartitionTable(Retained<DiskDevice>&& device);
|
||||
MBRPartitionTable(NonnullRefPtr<DiskDevice>&& device);
|
||||
~MBRPartitionTable();
|
||||
|
||||
bool initialize();
|
||||
RetainPtr<DiskPartition> partition(unsigned index);
|
||||
RefPtr<DiskPartition> partition(unsigned index);
|
||||
|
||||
private:
|
||||
Retained<DiskDevice> m_device;
|
||||
NonnullRefPtr<DiskDevice> m_device;
|
||||
|
||||
ByteBuffer read_header() const;
|
||||
const MBRPartitionHeader& header() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue