refactor: Move all constants in sysman namespace

- Use inline constexpr for declaring global variables
- Avoid using Macros
- Use string_view type instead of std::string

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2024-09-21 22:22:17 +00:00
committed by Compute-Runtime-Automation
parent 7f6b259f0e
commit 82eacc88bf
13 changed files with 91 additions and 85 deletions

View File

@@ -56,7 +56,7 @@ void OsFirmware::getSupportedFwTypes(std::vector<std::string> &supportedFwTypes,
void LinuxFirmwareImp::osGetFwProperties(zes_firmware_properties_t *pProperties) {
if (ZE_RESULT_SUCCESS != getFirmwareVersion(osFwType, pProperties)) {
strncpy_s(static_cast<char *>(pProperties->version), ZES_STRING_PROPERTY_SIZE, unknown.c_str(), ZES_STRING_PROPERTY_SIZE - 1);
strncpy_s(static_cast<char *>(pProperties->version), ZES_STRING_PROPERTY_SIZE, unknown.data(), ZES_STRING_PROPERTY_SIZE - 1);
}
pProperties->canControl = true; // Assuming that user has permission to flash the firmware
}