165. 

Common functions and variables, used by other OSR modules

165.1. Summary of Module Globals

List of Global Functions

  • EmptyList -

  • EmptyListWithParam -

  • EmptyMap -

  • EmptyString -

  • False - Functions that could be used as a default in lookups for functin pointers

  • GetGroupMap - Get group data.

  • GlobalProvides - Set the new value of global_provides map

  • IsSubSet - Checks if the first specified list (of strings) is a subset of the second one. The sequence of entries in the lists is nonrelevant.

  • ProvideBoolean - Stores the given boolean value with the specified name into the global_provides map in the osr_map.

  • ProvideList - Stores the given list with the specified name into the global_provides map in the osr_map.

  • ProvideMap - Stores the given map with the specified name into the global_provides map in the osr_map.

  • ProvidePath - Stores the given path with the specified name into the global_provides map in the osr_map.

  • ProvideString - Stores the given string with the specified name into the global_provides map in the osr_map.

  • RequireBoolean - Returns the required boolean value from the global_provides map in the osr_map.

  • RequireList - Returns the required list from the global_provides map in the osr_map.

  • RequireMap - Returns the required map from the global_provides map in the osr_map.

  • RequirePath - Returns the required path from the global_provides map in the osr_map.

  • RequireString - Returns the required string from the global_provides map in the osr_map.

  • Reset - Reset variables moved from OSR.ycp

  • SetGlobalProvides - Set the new value of global_provides map

  • SymbolError -

List of Global Variables

  • current_detect_map - The current detection map during detection.

  • current_direct_name - The name of the current direct repair method.

  • current_module_name - The name of the current module during detection. e.g.: osr_module_partition

  • detect_group_list - ["init", "mbr_check", "swap_check", "fs_check", "fstab_check"]

  • global_entries - $[ "fs_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check filesystem" ], "fstab_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check fstab entries" ], "init" : $[ "help" : "", "mode" : "forall", "text" : "Init repair system" ], "mbr_check" : $[ "help" : "If you have installed a other os after inst. Linux", "text" : "Check master boot record" ], ........ ]

  • tool_name - The name of the repair and rescue tool.

165.2. Global Functions

165.2.1. EmptyList

Return value

  • list - []

165.2.2. EmptyListWithParam

Function parameters

  • list param

Return value

  • list - []

165.2.3. EmptyMap

Return value

  • map - $[]

165.2.4. EmptyString

Return value

  • string - ""

165.2.5. False

Functions that could be used as a default in lookups for functin pointers

Return value

  • boolean - false

165.2.6. GetGroupMap

Get group data.

Function parameters

  • string key

Return value

  • map

165.2.7. GlobalProvides

Set the new value of global_provides map

Return value

  • map<string,any>

165.2.8. IsSubSet

Checks if the first specified list (of strings) is a subset of the second one. The sequence of entries in the lists is nonrelevant.

Function parameters

  • list<string> l1

  • list<string> l2

Return value

  • boolean - True if all elements of l1 are contained in l2 or if l1 is empty.

Example 41. 

 OSRIsSubSet([], ["a", "b"]) -> true;
 OSRIsSubSet(["a"], ["a", "b"]) -> true;
 OSRIsSubSet(["c"], ["a", "b"]) -> false;
 OSRIsSubSet(["a", "b", "c"], ["a", "b"]) -> false;


165.2.9. ProvideBoolean

Stores the given boolean value with the specified name into the global_provides map in the osr_map.

Function parameters

  • string name

  • boolean value

Return value

  • boolean - True.

165.2.10. ProvideList

Stores the given list with the specified name into the global_provides map in the osr_map.

Function parameters

  • string name

  • list value

Return value

  • boolean - True.

165.2.11. ProvideMap

Stores the given map with the specified name into the global_provides map in the osr_map.

Function parameters

  • string name

  • map value

Return value

  • boolean - True.

165.2.12. ProvidePath

Stores the given path with the specified name into the global_provides map in the osr_map.

Function parameters

  • string name

  • path value

Return value

  • boolean - True.

165.2.13. ProvideString

Stores the given string with the specified name into the global_provides map in the osr_map.

Function parameters

  • string name

  • string value

Return value

  • boolean - True.

165.2.14. RequireBoolean

Returns the required boolean value from the global_provides map in the osr_map.

Function parameters

  • string name

Return value

  • boolean - value The required boolean value, false as default.

165.2.15. RequireList

Returns the required list from the global_provides map in the osr_map.

Function parameters

  • string name

Return value

  • list - The required list, [] as default.

165.2.16. RequireMap

Returns the required map from the global_provides map in the osr_map.

Function parameters

  • string name

Return value

  • map - The required map, $[] as default.

165.2.17. RequirePath

Returns the required path from the global_provides map in the osr_map.

Function parameters

  • string name

Return value

  • path - value The required path, . as default.

165.2.18. RequireString

Returns the required string from the global_provides map in the osr_map.

Function parameters

  • string name

Return value

  • string - value The required string, "" as default.

165.2.19. Reset

Reset variables moved from OSR.ycp

Return value

  • void

165.2.20. SetGlobalProvides

Set the new value of global_provides map

Function parameters

  • map new

Return value

  • void

165.2.21. SymbolError

Return value

  • symbol - `error

165.3. Global Variables

165.3.1. current_detect_map

The current detection map during detection.

165.3.2. current_direct_name

The name of the current direct repair method.

165.3.3. current_module_name

The name of the current module during detection. e.g.: osr_module_partition

165.3.4. detect_group_list

["init", "mbr_check", "swap_check", "fs_check", "fstab_check"]

165.3.5. global_entries

$[ "fs_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check filesystem" ], "fstab_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check fstab entries" ], "init" : $[ "help" : "", "mode" : "forall", "text" : "Init repair system" ], "mbr_check" : $[ "help" : "If you have installed a other os after inst. Linux", "text" : "Check master boot record" ], ........ ]

165.3.6. tool_name

The name of the repair and rescue tool.

165.4. Module Requirements

none