Unknown YCP Module |
routines.ycp |
|
|
This module has an unstable interface. |
Functions used in hwinfo and in init_hwinfo modules.
Imports
Includes
Local VariablesLocal Functions
|
reads values from map and creates formatted label for monitor resolution data
- Parameters:
-
a dummy parameter? m device info
- Return value:
-
formatted label
tries to determine hardware name by class_id and sub_class_id and substitues them in given map. returns modified map
- Parameters:
-
hw device info
- Return value:
-
device info with translated class information
Translate subclass identification of the device
- Parameters:
-
a dummy parameter? m device information
- Return value:
-
translated subclass name
order table: list of lists. first item of nested list is key name second is term that should be used for formating the key- takes key name as first argument if third item is true, the whole map will be passed to term as second argument
translate string - looks to the translation table and returns value
- Parameters:
-
str string to translate
- Return value:
-
translated string or original string if translation is unknown
translate boolean to Yes/No
- Parameters:
-
b any value
- Return value:
-
parameter b converted to string, if b is boolean then Yes/No is returned
evals to true if given value is scalar (not map or term or list)
- Parameters:
-
node any value
- Return value:
-
true if parameter node is a scalar value (it isn't a list or a map)
if expandTree function tries to explore list, it should use some label for each item. it tree items are maps, this function decides which value from map will be used as label
- Parameters:
-
m device info
- Return value:
-
name of the selected representant for whole map
Recursively converts (scalar/nested) lists and maps to tree datastructure
- Parameters:
-
node any value
- Return value:
-
list of items (content of tree widget)
Save hwinfo output to the specified file
- Parameters:
-
file Target file
- Return value:
-
True if saving was successful
Save hwinfo output to the specified file, progress popup is displayed. Display error message when saving failed.
- Parameters:
-
target_file_name Target file
- Return value:
-
True if saving was successful
Mount specified device
- Parameters:
-
device device name to mount
- Return value:
-
mount point where device was mounted (in /tmp subdirectory) or nil when mount failed
Unmount device
- Parameters:
-
mount_point directory where device is mounted
- Return value:
-
true on success