Got the Visit() return value wrong: "true" means to abort visiting the

partitions, because the right entry was found - but we always want to
visist all partitions, anyway.
Also, if a partition has not been mounted yet, no mount point will be
printed.
The device string is still missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12550 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-05-03 02:04:02 +00:00
parent 75e4e6ee69
commit 1a802114af
1 changed files with 9 additions and 7 deletions

View File

@ -163,7 +163,7 @@ struct MountVisitor : public BDiskDeviceVisitor {
}
}
return true;
return false;
}
bool silent;
@ -198,17 +198,19 @@ struct PrintPartitionsVisitor : public BDiskDeviceVisitor {
{
// get name and type
const char *name = partition->ContentName();
if (name == NULL) {
if (name == NULL || name[0] == '\0') {
name = partition->Name();
if (name == NULL)
name = "<unknown>";
if (name == NULL || name[0] == '\0')
name = "<unnamed>";
}
BPath path;
partition->GetMountPoint(&path);
if (partition->IsMounted())
partition->GetMountPoint(&path);
printf("%-16s %-20s %s\n", name, partition->ContentType(), path.Path());
return true;
printf("%-16s %-20s %s\n",
name, partition->ContentType(), partition->IsMounted() ? path.Path() : "");
return false;
}
bool listMountablePartitions;