Opened 2 years ago

Closed 2 years ago

#17969 closed bug (fixed)

[Bootmanager] Wrong partition names

Reported by: bipolar Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: Applications/BootManager Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is on hrev56511, 64 bits (but I see the same on hrev56480 32 bits install on the same HDD)

Bootmanager seems to have probems reading the partition names (used as initial values for the Bootman boot menu):

It works OK on hrev56193:


Note: both Tracker's Mount menu and DriveSetup show the correct partitions names.

Attachments (2)

Bootmanager-WrongSizes-and-weird-partition-labels.png (81.2 KB ) - added by bipolar 2 years ago.
Bootmanager-hrev56193.png (54.4 KB ) - added by bipolar 2 years ago.

Download all attachments as: .zip

Change History (8)

by bipolar, 2 years ago

Attachment: Bootmanager-hrev56193.png added

comment:1 by bipolar, 2 years ago

Sorry for assigning the wrong component and version: Webpositive logged me out in my early attempt at filling this ticket, and I forgot to change those this time.

comment:2 by bipolar, 2 years ago

The following modification makes it show the correct names:

diff --git a/src/apps/bootmanager/LegacyBootMenu.cpp b/src/apps/bootmanager/LegacyBootMenu.cpp
index 2424c92d..d9d66f80 100644
--- a/src/apps/bootmanager/LegacyBootMenu.cpp
+++ b/src/apps/bootmanager/LegacyBootMenu.cpp
@@ -246,7 +246,7 @@ PartitionRecorder::Visit(BPartition* partition, int32 level)
        partition->GetPath(&partitionPath);
 
        BString buffer;
-       const char* name = partition->ContentName();
+       const char* name = partition->RawContentName();
        if (name == NULL) {
                BString number;
                number << ++fUnnamedIndex;

Does this sounds like the right fix? Should I just send it to gerrit as-is?

Edit: I guess I'm warry as to why BPartition's ContentName() worked for the last partition, but not for the others, so there might be more things involved that I do not know about.

Last edited 2 years ago by bipolar (previous) (diff)

comment:3 by korli, 2 years ago

Could you try with the following? ContentName() returns a BString since hrev56463

@@ -246,8 +246,8 @@ PartitionRecorder::Visit(BPartition* partition, int32 level)
        partition->GetPath(&partitionPath);
 
        BString buffer;
-       const char* name = partition->ContentName();
-       if (name == NULL) {
+       BString name = partition->ContentName();
+       if (name.Length() == 0) {
                BString number;
                number << ++fUnnamedIndex;
                buffer << B_TRANSLATE_COMMENT("Unnamed %d",

in reply to:  3 comment:4 by bipolar, 2 years ago

Replying to korli:

Could you try with the following? ContentName() returns a BString since hrev56463

Works like a charm!

Version 0, edited 2 years ago by bipolar (next)

comment:5 by bipolar, 2 years ago

Fixed on hrev56513.

(Ticket's Component and Version fields should read: "Applications/BootManager" and "R1/Development" respectively).

comment:6 by nephele, 2 years ago

Component: - GeneralApplications/BootManager
Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed
Version: R1/beta3R1/Development
Note: See TracTickets for help on using tickets.