
functions
files
intro
|
|
Configuration of IDE DMA mode
|
modules/Idedma.ycp
|
Data for configuration of IDE DMA mode, input and output functions.
|
|
|
Representation of the configuration of IDE DMA mode.
Input and output routines.
Imports
Includes
Global Variables
Global Functions
Local Variables
Local Functions
|
|
|
local ide_devices -> list<map<string,any> >
|
|
List of all IDE devices with descriptions and DMA settings
local hdparm_bin -> string
|
|
Full path to hdparm binary
global dma_on_string -> string
|
|
String with DMA on status text
(For translators: translation can be long - text is used in the table
in column "Required DMA mode" and "Current DMA mode")
global dma_off_string -> string
|
|
String with DMA off status text
(For translators: translation can be long - text is used in the table
in column "Required DMA mode" and "Current DMA mode")
global dma_default_string -> string
|
|
String with no change of DMA status text
(For translators: translation can be long - text is used in the table
in column "Required DMA mode" and "Current DMA mode")
global get_device_dma_status (string device) -> string
|
|
Return actual DMA status of IDE device
- Parameters:
device |
Identification of ide device, e.g. "/dev/hdc" |
- Return value:
|
true if DMA is on, false if DMA is off or nil on error |
local get_dma_info (string device) -> string
|
|
Get DMA information status for device
- Parameters:
device |
device name (e.g. "/dev/hdc") |
- Return value:
|
DMA information from hdparm ("mdma2 udma0 udma1 *udma2") |
local get_current_dma_mode (string dma_info) -> string
|
|
Parse DMA info string from hdparm output - return current DMA mode (has mark '*')
- Parameters:
dma_info |
DMA support string (e.g. "mdma2 udma0 udma1 *udma2") |
- Return value:
|
current DMA mode or "" if unknown |
local get_supported_dma_modes (string dma_info) -> list<string>
|
|
Parse DMA info string from hdparm output - return list of supported DMA modes
- Parameters:
dma_info |
DMA support string (e.g. "mdma2 udma0 udma1 *udma2") |
- Return value:
|
list of supported DMA modes |
global Read () -> boolean
|
|
Read all DMA settings from the SCR
- Return value:
global get_ide_devices () -> list<map>
|
|
Return information about all IDE devices
- Return value:
|
List of maps with information about all IDE devices |
global supported_dma_modes (string device) -> list
|
|
Get list of supported DMA modes for selected device
- Parameters:
device |
device name ("/dev/hda") |
- Return value:
|
supported DMA modes (["mdma2", "udma0", "udma1", "udma2"]) |
global selected_mode (string device) -> string
|
|
Get selected DMA mode, which will be saved and set in Write
- Parameters:
device |
device name ("/dev/hda") |
- Return value:
|
selected DMA mode ("on", "off", "nochange", or mode supported by hdparm - "udma5",...) |
global set_dma (string device, string dma_setting) -> boolean
|
|
Set DMA of device
- Parameters:
device |
Identification of IDE device, e.g. "/dev/hda" |
dma_setting |
DMA mode (e.g. "mdma2", "udma5", "off",...) |
- Return value:
global Write () -> boolean
|
|
Update the SCR according to DMA settings
- Return value:
global Set (list<map<string,any> > settings) -> void
|
|
Set module data
- Parameters:
settings |
set data from YCP |
global Import (list<map<string,any> > settings) -> boolean
|
|
Get all IDE DMA settings from the first parameter
(For use by autoinstallation.)
- Parameters:
settings |
The YCP structure to be imported. |
- Return value:
Dump the IDE DMA settings to a single map
(For use by autoinstallation.)
- Return value:
|
Dumped settings (later acceptable by Import ()) |
global set_test_data () -> void
|
|
Set system configuration without reading values from
system - for testing and screenshot mode
global Summary (boolean all, boolean richtext) -> string
|
|
Create rich text description of the current configuration
- Parameters:
all |
when true all IDE devices are contained in the summary text
(even unconfigured devices with default DMA mode) |
richtext |
select rich/plain text output |
- Return value:
|