Re: [PATCH f14-branch master 3/3] Add noeject support to cdrom eject handling (#477887)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



See below.

On Thu, 2010-09-09 at 18:14 -0700, Brian C. Lane wrote:
> ---
>  pyanaconda/storage/devices.py |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
> index c5983ee..752dec8 100644
> --- a/pyanaconda/storage/devices.py
> +++ b/pyanaconda/storage/devices.py
> @@ -108,6 +108,7 @@ import block
>  
>  from errors import *
>  from pyanaconda.iutil import notify_kernel, numeric_type
> +from pyanaconda.flags import flags
>  from .storage_log import log_method_call
>  from udev import *
>  from formats import get_device_format_class, getFormat, DeviceFormat
> @@ -3551,6 +3552,10 @@ class OpticalDevice(StorageDevice):
>          if not self.exists:
>              raise DeviceError("device has not been created", self.name)
>  
> +        if flags.cmdline.has_key('noeject'):
> +            log.info("noeject in effect, not ejecting cdrom")
> +            return
> +
>          #try to umount and close device before ejecting
>          self.teardown()
>  

I think you want to put the early return after the self.teardown() call.
Otherwise any mounted filesystems will not get unmounted.

Dave


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux