[haiku-bugs] Re: [Haiku] #9012: Add disk device name

  • From: "dsjonny" <trac@xxxxxxxxxxxx>
  • Date: Wed, 28 Nov 2012 22:43:34 -0000

#9012: Add disk device name
---------------------------------------+----------------------------
   Reporter:  dsjonny                  |      Owner:  stippi
       Type:  enhancement              |     Status:  new
   Priority:  normal                   |  Milestone:  R1
  Component:  Applications/DriveSetup  |    Version:  R1/Development
 Resolution:                           |   Keywords:
 Blocked By:                           |   Blocking:
Has a Patch:  0                        |   Platform:  All
---------------------------------------+----------------------------

Comment (by dsjonny):

 Thank you! This works fine, and not not only for the DriveSetup, but for
 the BootManager too.

 [[Image(ds2.png)]]

 I have changed this in the source:
 DiskView.cpp at line 203
 {{{
         virtual bool Visit(BDiskDevice* device)
         {
                 if (device->Name() != NULL && device->Name()[0])
                 {
                         PartitionView* view = new
 PartitionView(device->Name(), 1.0,
                                 device->Offset(), 0, device->ID());
                         fViewMap.Put(device->ID(), view);
                         fView->GetLayout()->AddView(view);
                         _AddSpaces(device, view);
                 }
                 else
                 {
                         PartitionView* view = new
 PartitionView(B_TRANSLATE("Device"), 1.0,
                                 device->Offset(), 0, device->ID());
                         fViewMap.Put(device->ID(), view);
                         fView->GetLayout()->AddView(view);
                         _AddSpaces(device, view);
                 }
                 return false;
         }
 }}}

 PartitionList.cpp at line 237
 {{{
         if (partition->IsDevice())
         {
                 if (partition->Name() != NULL && partition->Name()[0])
                         SetField(new BStringField(partition->Name()),
 kVolumeNameColumn);
         }
 }}}

 [[Image(bm.png)]]

 But there is another problem: I have change the SATA type to AHCI from IDE
 in the BIOS, and the device name's chars are "randomized". For USB device
 that is still correct. Can you fix it?

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/9012#comment:6>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: