YaST2 Developers Documentation: repair

repair

OSRCommon.ycp
Common functions and variables, used by other OSR modules

This module has an unstable interface.

Global Variables

Global Functions

Local Variables

Info:

Variables and functions in these module were moved from other OSR* modules to break their cyclic dependencies.

global False () -> boolean

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

Return value:
false
global SymbolError () -> symbol

Return value:
`error
global EmptyString () -> string

Return value:
""
global EmptyMap () -> map

Return value:
$[]
global EmptyList () -> list

Return value:
[]
global current_direct_name -> string

The name of the current direct repair method.

global tool_name -> string

The name of the repair and rescue tool.

global current_module_name -> string

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

global detect_group_list -> list<string>

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

global current_detect_map -> map

The current detection map during detection.

global global_entries -> map

$[ "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" ], ........ ]

local global_provides -> map<string,any>

The global_provides map contains entries created during the system scan. The different detection methods access to the global_provides map to get informations from former detection methods. $["fs_module_loaded":true, "has_floppy":true, "just_mounted":[$["mountpoint":"/mnt", "partition":"/dev/hda3"]], "linux_partition_list":["/dev/hda1", "/dev/hda3", "/dev/hda6"], "mount_possible_list":["/dev/hda1", "/dev/hda3", "/dev/hda6"], "mounted_partitions":[$["file":"/mnt", "freq":0, "mntops":"rw", "passno":0, "spec":"/dev/hda3", "vfstype":"reiserfs"],..,], "repair_target":"", "root_mounted":true, "root_mountpoint":"/mnt", "root_partition":"/dev/hda3", "root_partition_type":"reiserfs", "swap_partition_list":["/dev/hda2", "/dev/hda5"], "swapable_partitions":["/dev/hda2", "/dev/hda5"], "valid_fstab":true, "valid_root_partitions":["/dev/hda3"], "valid_swap_partitions":["/dev/hda2", "/dev/hda5"], "valid_target":true, "valid_target_list":["/dev/hda"]]

global ProvideList (string name, list value) -> boolean

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

API function,

Parameters:
name
value
Return value:
True.
global ProvideMap (string name, map value) -> boolean

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

API function,

Parameters:
name
value
Return value:
True.
global ProvideString (string name, string value) -> boolean

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

API function,

Parameters:
name
value
Return value:
True.
global ProvidePath (string name, path value) -> boolean

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

API function,

Parameters:
name
value
Return value:
True.
global ProvideBoolean (string name, boolean value) -> boolean

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

API function,

Parameters:
name
value
Return value:
True.
global RequireString (string name) -> string

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

API function,

Parameters:
name
Return value:
value The required string, "" as default.
global RequireList (string name) -> list

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

API function,

Parameters:
name
Return value:
The required list, [] as default.
global RequireMap (string name) -> map

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

API function,

Parameters:
name
Return value:
The required map, $[] as default.
global RequirePath (string name) -> path

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

API function,

Parameters:
name
Return value:
value The required path, . as default.
global RequireBoolean (string name) -> boolean

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

API function,

Parameters:
name
Return value:
value The required boolean value, false as default.
global Reset () -> void

Reset variables moved from OSR.ycp

global SetGlobalProvides (map new) -> void

Set the new value of global_provides map

Parameters:
new
global GlobalProvides () -> map<string,any>

Set the new value of global_provides map

global GetGroupMap (string key) -> map

Get group data.

Parameters:
key
global IsSubSet (list<string> l1, list<string> l2) -> boolean

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

For internal use only. See the testsuite.

Parameters:
l1
l2
Return value:
True if all elements of l1 are contained in l2 or if l1 is empty.
Example
 OSRIsSubSet([], ["a", "b"]) -> true;
 OSRIsSubSet(["a"], ["a", "b"]) -> true;
 OSRIsSubSet(["c"], ["a", "b"]) -> false;
 OSRIsSubSet(["a", "b", "c"], ["a", "b"]) -> false;