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)
Change History (8)
by , 2 years ago
Attachment: | Bootmanager-WrongSizes-and-weird-partition-labels.png added |
---|
by , 2 years ago
Attachment: | Bootmanager-hrev56193.png added |
---|
comment:1 by , 2 years ago
comment:2 by , 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 ContentName() worked for the last partition, but not for the others, so there might be more things involved that I do not know about.
follow-up: 4 comment:3 by , 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",
comment:4 by , 2 years ago
Replying to korli:
Could you try with the following? ContentName() returns a BString since hrev56463
Works like a charm!
Edit: still scratching my head as to why the last partition was getting the correct name, but not the first ones... and from where that "metype" was being read (from the names of some fields of the BMessage, I guess: "name" and "type"). C++ is scary :-D
comment:5 by , 2 years ago
Fixed on hrev56513.
(Ticket's Component and Version fields should read: "Applications/BootManager" and "R1/Development" respectively).
comment:6 by , 2 years ago
Component: | - General → Applications/BootManager |
---|---|
Milestone: | Unscheduled → R1/beta4 |
Resolution: | → fixed |
Status: | new → closed |
Version: | R1/beta3 → R1/Development |
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.