[mythtv-commits] Ticket #2462: Eject media button fails if tray is empt

MythTV mythtv at cvs.mythtv.org
Wed Feb 14 03:26:24 UTC 2007


#2462: Eject media button fails if tray is empt
------------------------------------------+---------------------------------
 Reporter:  list-mythtv at bluecamel.eml.cc  |        Owner:  stuartm
     Type:  defect                        |       Status:  new    
 Priority:  minor                         |    Milestone:  unknown
Component:  mythtv                        |      Version:  0.20   
 Severity:  medium                        |   Resolution:         
------------------------------------------+---------------------------------
Comment (by nigel):

 The double-eject requirement seems to be when the drive is mounted. Here
 is a patch (against 0-20-fixes) that seems to work for me (which also
 makes sure, if the drive is mounted, to unlock it before ejecting):
 {{{
 % svn diff mythmediamonitor.cpp
 Index: mythmediamonitor.cpp
 ===================================================================
 --- mythmediamonitor.cpp        (revision 12786)
 +++ mythmediamonitor.cpp        (working copy)
 @@ -157,6 +157,7 @@
      if (!selected)
          return;

 +    bool doEject = false;
      int status = selected->getStatus();
      QString dev = selected->getVolumeID();

 @@ -177,8 +178,13 @@
                                        "eject unmount fail",
                                        tr("Failed to unmount
 %1").arg(dev));
          }
 +        else
 +            doEject = true;
      }
      else
 +        doEject = true;
 +
 +    if (doEject)
      {
          selected->unlock();

 }}}

 The original problem (open the empty tray) will have to wait for some new
 code that calls GetCDROMBlockDevices() to work out what to open.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2462#comment:5>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list