summaryrefslogtreecommitdiff
path: root/Source/Kernel/VFS/Part.ns.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-11-27 20:43:25 +0100
committerAlexis211 <alexis211@gmail.com>2009-11-27 20:43:25 +0100
commit56ace5efd6ccc02004ddafb1e564a3f9d5d538d2 (patch)
treec8219690b234d5ac1b761236e4c43b9706057462 /Source/Kernel/VFS/Part.ns.cpp
parenta40fe1166ab1db972a8ca0380d603c4d90eede62 (diff)
downloadMelon-56ace5efd6ccc02004ddafb1e564a3f9d5d538d2.tar.gz
Melon-56ace5efd6ccc02004ddafb1e564a3f9d5d538d2.zip
Added some screenshots, re-organized some stuff.
Diffstat (limited to 'Source/Kernel/VFS/Part.ns.cpp')
-rw-r--r--Source/Kernel/VFS/Part.ns.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Kernel/VFS/Part.ns.cpp b/Source/Kernel/VFS/Part.ns.cpp
index 7184f90..1bd6a8e 100644
--- a/Source/Kernel/VFS/Part.ns.cpp
+++ b/Source/Kernel/VFS/Part.ns.cpp
@@ -57,6 +57,7 @@ u32int getDeviceID(BlockDevice* dev) {
}
BlockDevice* dev(String _class, u32int idx) {
+ if (_class.empty()) _class = "block";
for (u32int i = 0; i < devices.size(); i++) {
String devclass = devices[i]->getClass();
if (devclass == _class or (devclass.size() > _class.size() and devclass.substr(0, _class.size()) == _class)) {
@@ -83,4 +84,8 @@ Partition* part(BlockDevice* dev, u32int idx) {
return NULL;
}
+String partIdentifier(Partition* p) {
+ return String("d") += String::number(getDeviceID(p->getDevice())) += String("p") += String::number(p->getPartNumber());
+}
+
}