Class: Bootloader::UdevMapping
- Inherits:
-
Object
- Object
- Bootloader::UdevMapping
- Extended by:
- Forwardable
- Includes:
- Singleton, Yast::I18n, Yast::Logger
- Defined in:
- src/lib/bootloader/udev_mapping.rb
Overview
Class manages mapping between udev names of disks and partitions.
Instance Method Summary collapse
-
#to_kernel_device(dev) ⇒ String?
Converts full udev name to kernel device ( disk or partition ).
-
#to_mountby_device(dev) ⇒ String
Converts udev or kernel device (disk or partition) to udev name that fits best.
Instance Method Details
#to_kernel_device(dev) ⇒ String?
Converts full udev name to kernel device ( disk or partition )
31 32 33 34 35 36 37 38 |
# File 'src/lib/bootloader/udev_mapping.rb', line 31 def to_kernel_device(dev) textdomain "bootloader" log.info "call to_kernel_device for #{dev}" raise "invalid device nil" unless dev # method udev_to_kernel works also for alternative raid names (bnc#944041) udev_to_kernel(dev) end |
#to_mountby_device(dev) ⇒ String
Converts udev or kernel device (disk or partition) to udev name that fits best.
The strategy to discover the best udev name is delegated to storage-ng, see Y2Storage::Filesystems::BlkFilesystem#preferred_name
47 48 49 50 51 52 53 |
# File 'src/lib/bootloader/udev_mapping.rb', line 47 def to_mountby_device(dev) kernel_dev = to_kernel_device(dev) log.info "#{dev} looked as kernel device name: #{kernel_dev}" kernel_to_udev(kernel_dev) end |