Minor changes. The file for the file device lives now in ~/tmp instead of /tmp to be persistent.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3655 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7eb12758ed
commit
0843d5108a
@ -11,6 +11,8 @@
|
||||
#include <KDiskDevice.h>
|
||||
#include <KDiskDeviceManager.h>
|
||||
|
||||
const char *kTestFileDevice = "/boot/home/tmp/test-file-device";
|
||||
|
||||
// main
|
||||
int
|
||||
main()
|
||||
@ -18,7 +20,7 @@ main()
|
||||
KDiskDeviceManager::CreateDefault();
|
||||
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
|
||||
manager->InitialDeviceScan();
|
||||
status_t error = manager->CreateFileDevice("/tmp/test-file-device");
|
||||
status_t error = manager->CreateFileDevice(kTestFileDevice);
|
||||
if (error != B_OK)
|
||||
printf("creating the file device failed: %s\n", strerror(error));
|
||||
if (manager->Lock()) {
|
||||
@ -28,6 +30,12 @@ main()
|
||||
}
|
||||
manager->Unlock();
|
||||
}
|
||||
|
||||
// error = manager->DeleteFileDevice(kTestFileDevice);
|
||||
// if (error != B_OK)
|
||||
// printf("deleting the file device failed: %s\n", strerror(error));
|
||||
|
||||
|
||||
KDiskDeviceManager::DeleteDefault();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user