TV cards configuration |
modules/ModulesComments.ycp |
Library for handling special comments in /etc/modules.conf | |
|
|
This module has an unstable interface. |
Functions for handling special comments in /etc/modules.conf
Global Functions |
global
StoreToComment (string name, string unique_key)
->
string
Create comment for modules.conf from the unique key and the name of the card. It will be parsed when reading. This comment should be placed before the alias differentiating the card (char-major-81-x for TV cards, ethx for ethernet, ...)
- Parameters:
-
name Name of the card unique_key Unique key
- Return value:
-
The comment.
- Example
-
ModulesComments::StoreToComment ("Ultra brutal TV card", "xyza.aiLKJkjsdlj") -> "# xyza.aiLKJkjsdlj:Ultra brutal TV card\n"
global
ExtractFromComment (string comment)
->
map
Extacts the unique key and the name of the card from comment in the modules.conf placed before the alias differentiatin the card.
- Parameters:
-
comment The comment
- Return value:
-
Returns map: $[ "unique_key" : string, "name" : string ]
- Example
-
ModulesComments::ExtractFromComment ("# xyza.aiLKJkjsdlj:Ultra brutal TV card\n") -> $[ "name" : "Ultra brutal TV card", "unique_key" : "xyza.aiLKJkjsdlj" ]