summaryrefslogtreecommitdiff
path: root/Kernel/Storage/RamdiskDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Storage/RamdiskDevice.cpp')
-rw-r--r--Kernel/Storage/RamdiskDevice.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/Storage/RamdiskDevice.cpp b/Kernel/Storage/RamdiskDevice.cpp
index 1c407f80b8..c73e47b431 100644
--- a/Kernel/Storage/RamdiskDevice.cpp
+++ b/Kernel/Storage/RamdiskDevice.cpp
@@ -82,4 +82,11 @@ void RamdiskDevice::start_request(AsyncBlockDeviceRequest& request)
}
}
+String RamdiskDevice::device_name() const
+{
+ // FIXME: Try to not hardcode a maximum of 16 partitions per drive!
+ size_t drive_index = minor() / 16;
+ return String::formatted("ramdisk{}", drive_index);
+}
+
}