CfgMgr::RevertSnapshotFromFile

Description

Restores a snapshot file by path.

Prototype

uint32_t CfgMgr::RevertSnapshotFromFile(const std::string &filePath, const bool isSync = true)

Function Security Level

ASIL-D

Parameters

Parameter

Input/Output

Description

filePath

Input

Path of the snapshot file.

isSync

Input

Whether to write persistent files synchronously. The default value is true.

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

The specified path must be valid and configured in the startup file.