-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firmware: Read new firmware version from sysfs
- Read the newly added firmware version from sysfs node Related-To: LOCI-2557 Signed-off-by: Pichika Uday Kiran <[email protected]>
- Loading branch information
1 parent
ca4af1d
commit 99cbd1b
Showing
4 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
level_zero/tools/source/sysman/firmware/linux/os_firmware_imp_helper.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (C) 2021 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
#include "level_zero/tools/source/sysman/firmware/linux/os_firmware_imp.h" | ||
|
||
namespace L0 { | ||
|
||
ze_result_t LinuxFirmwareImp::getFirmwareVersion(std::string fwType, zes_firmware_properties_t *pProperties) { | ||
std::string fwVersion; | ||
ze_result_t result = pFwInterface->getFwVersion(fwType, fwVersion); | ||
if (ZE_RESULT_SUCCESS == result) { | ||
strncpy_s(static_cast<char *>(pProperties->version), ZES_STRING_PROPERTY_SIZE, fwVersion.c_str(), ZES_STRING_PROPERTY_SIZE); | ||
} | ||
return result; | ||
} | ||
|
||
} // namespace L0 |