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