CfgMgr::Reset
Description
Deletes persistent data based on parameters.
Prototype
Function Security Level
ASIL-D
Parameters
- Deleting persistent data based on a single parameter
Parameter
Input/Output
Description
kParam
Input
Parameter key, which must be complete.
isSync
Input
Whether to write persistent files synchronously. The default value is false.
- Deleting persistent data based on multiple parameters
Parameter
Input/Output
Description
kParam
Input
Parameter key, which must be complete. Multiple keys can be input.
isSync
Input
Whether to write persistent files synchronously. The default value is false.
Returns
The return value is of the uint32_t type. If the operation is successful, CFGMGR_SUCCESS is returned. If the operation fails, an error code is returned.
Usage
After SELinux permission control is enabled, non-privileged processes can be called only after the read and write permissions on dp:/res/cfgmgr/mgmt are configured.
Precautions
- If the key is present in the basic YAML file , the default key is used. (It is not persistent and will be modified in the memory.) Otherwise, the key will be removed.
- If all persistent data is deleted after the reset, persistent files are deleted. If no persistent data is available during the restart, the system attempts to inherit persistent data by version. If the inheritance fails, an alarm is generated.
- If the key does not exist in the environment, a success message is returned.
Parent topic: Configuration Management