Dump()s the devices now and creates a file disk system.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3611 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-06-22 23:17:02 +00:00
parent 4ab0785cd8
commit d6788c75c2

View File

@ -8,6 +8,7 @@
#include <OS.h>
#include <KDiskDevice.h>
#include <KDiskDeviceManager.h>
// main
@ -17,6 +18,16 @@ main()
KDiskDeviceManager::CreateDefault();
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
manager->InitialDeviceScan();
status_t error = manager->CreateFileDevice("/tmp/test-file-device");
if (error != B_OK)
printf("creating the file device failed: %s\n", strerror(error));
if (manager->Lock()) {
for (int32 i = 0; KDiskDevice *device = manager->DeviceAt(i); i++) {
device->Dump();
printf("\n");
}
manager->Unlock();
}
KDiskDeviceManager::DeleteDefault();
return 0;
}