Removed some debug info. Changes due to the removal of the extended_partition_info::partition_code field.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2751 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -37,13 +37,11 @@ print_partition_info(const char *prefix, const extended_partition_info &info)
|
||||
printf("%spartition ID: %ld\n", prefix, info.info.partition);
|
||||
printf("%sdevice: `%s'\n", prefix, info.info.device);
|
||||
printf("%sflags: %lx\n", prefix, info.flags);
|
||||
printf("%spartition code: 0x%lx\n", prefix, info.partition_code);
|
||||
printf("%spartition name: `%s'\n", prefix, info.partition_name);
|
||||
printf("%spartition type: `%s'\n", prefix, info.partition_type);
|
||||
printf("%sFS short name: `%s'\n", prefix, info.file_system_short_name);
|
||||
printf("%sFS long name: `%s'\n", prefix, info.file_system_long_name);
|
||||
printf("%svolume name: `%s'\n", prefix, info.volume_name);
|
||||
// printf("%smounted at: `%s'\n", prefix, info.mounted_at);
|
||||
printf("%sFS flags: 0x%lx\n", prefix, info.file_system_flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -286,23 +286,18 @@ printf("TestApp::MessageReceived(%.4s)\n", (char*)&message->what);
|
||||
// MediaChanged
|
||||
void MediaChanged(BMessage *message)
|
||||
{
|
||||
bigtime_t time = system_time();
|
||||
printf("TestApp::MediaChanged()\n");
|
||||
PrintDeviceInfo(message);
|
||||
print_time("PrintDeviceInfo()", time);
|
||||
int32 id;
|
||||
if (message->FindInt32("device_id", &id) == B_OK) {
|
||||
for (int32 i = 0; BDiskDevice *device = fDevices.ItemAt(i); i++) {
|
||||
if (device->UniqueID() == id) {
|
||||
bool updated;
|
||||
print_time("finding device", time);
|
||||
status_t error = device->Update(&updated);
|
||||
print_time("updating device", time);
|
||||
printf("updated: %d\n", updated);
|
||||
if (error == B_OK) {
|
||||
DumpVisitor visitor;
|
||||
device->Traverse(&visitor);
|
||||
print_time("dumping device", time);
|
||||
} else {
|
||||
printf("device->Update() failed: %s\n",
|
||||
strerror(error));
|
||||
@@ -366,19 +361,12 @@ print_time("dumping device", time);
|
||||
// PrintDeviceInfo
|
||||
void PrintDeviceInfo(BMessage *message)
|
||||
{
|
||||
bigtime_t time = system_time();
|
||||
int32 deviceID;
|
||||
if (message->FindInt32("device_id", &deviceID) == B_OK) {
|
||||
print_time("finding device_id", time);
|
||||
BDiskDeviceRoster roster;
|
||||
print_time("creating roster", time);
|
||||
BDiskDevice device;
|
||||
if (roster.GetDeviceWithID(deviceID, &device) == B_OK)
|
||||
{
|
||||
print_time("getting device", time);
|
||||
DumpVisitor().Visit(&device);
|
||||
print_time("dumping device", time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user