Common functions and variables, used by other OSR modules
List of Global Functions
EmptyMap -
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
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.
Functions that could be used as a default in lookups for functin pointers
Return value
boolean - false
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;
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Set the new value of global_provides map
Function parameters
map new
Return value
void
The name of the current module during detection. e.g.: osr_module_partition
$[ "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" ], ........ ]