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:
Ingo Weinhold 2003-02-18 21:33:23 +00:00
parent 0f008a1f78
commit 295fcc8865
5 changed files with 1 additions and 25 deletions

View File

@ -494,8 +494,6 @@ BDiskDeviceRoster::StopWatching(BMessenger target)
return error;
}
void print_time(const char *format, bigtime_t &time);
// _GetObjectWithID
/*! \brief Returns a BDiskDevice for a given device, session or partition ID.
@ -517,18 +515,15 @@ status_t
BDiskDeviceRoster::_GetObjectWithID(const char *fieldName, int32 id,
BDiskDevice *device) const
{
bigtime_t time = system_time();
status_t error = (device ? B_OK : B_BAD_VALUE);
// compose request message
BMessage request(B_REG_GET_DISK_DEVICE);
if (error == B_OK)
error = request.AddInt32(fieldName, id);
print_time("composing request message", time);
// send request
BMessage reply;
if (error == B_OK)
error = fManager.SendMessage(&request, &reply);
print_time("sending request", time);
// analyze reply
if (error == B_OK) {
// result
@ -540,10 +535,8 @@ print_time("sending request", time);
BMessage archive;
if (error == B_OK)
error = reply.FindMessage("device", &archive);
print_time("extracting archived device", time);
if (error == B_OK)
error = device->_Unarchive(&archive);
print_time("unarchiving device", time);
}
return error;
}

View File

@ -37,8 +37,7 @@ public:
int32 ID() const { return fID; }
int32 ChangeCounter() const { return fChangeCounter.Count(); }
// void Changed() { fChangeCounter.Increment(); }
void Changed() { if (fChangeCounter.Increment()) PRINT(("RDiskDevice::Changed()\n")); }
void Changed() { fChangeCounter.Increment(); }
void SetTouched(bool touched) { fTouched = touched; }
bool Touched() const { return fTouched; }

View File

@ -117,7 +117,6 @@ RPartition::Update(const extended_partition_info *partitionInfo)
|| strcmp(partitionInfo->file_system_long_name,
fInfo.file_system_long_name)
|| strcmp(partitionInfo->volume_name, fInfo.volume_name)
|| partitionInfo->partition_code != fInfo.partition_code
|| partitionInfo->file_system_flags != fInfo.file_system_flags) {
fInfo = *partitionInfo;
PartitionChanged();
@ -179,7 +178,6 @@ 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);

View File

@ -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);
}

View File

@ -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);
}
}
}