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

  • From: "dsjonny" <trac@xxxxxxxxxxxx>
  • Date: Fri, 30 Nov 2012 20:56:41 -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):

 Sorry for the coding style.

 I have changed the code:

 DiskView.cpp line 203:
 {{{
         virtual bool Visit(BDiskDevice* device)
         {
 >               const char* name;
 >               if (device->Name() != NULL && device->Name()[0] != '\0')
 >                       name = device->Name();
 >               else
 >                       name = B_TRANSLATE("Device");

 >               PartitionView* view = new PartitionView(name, 1.0,
                         device->Offset(), 0, device->ID());
                 fViewMap.Put(device->ID(), view);
                 fView->GetLayout()->AddView(view);
                 _AddSpaces(device, view);
                 return false;
         }
 }}}

 Thel ines started with ">" are my modification in the code. With these
 changes the disk device name will shown only on the disk map. So this will
 not make any problem if we have a raw device with FS (I think).

 This change will affect this:
 [[Image(ds3.png)]]

 I also created a new patch for this. I hope this is a usable solution. :)

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

Other related posts: