Change-Id: I4958028e552cd85fa31ae44f86c6b8129f291914
This commit is contained in:
yudechen
2023-05-27 10:33:53 +08:00
14 changed files with 53 additions and 31 deletions
+3 -3
View File
@@ -62,7 +62,7 @@ typedef struct ProductCompatibilityID {
uint8_t osSyscap[OS_SYSCAP_BYTES];
} PCIDMain;
static const char *pcidPath = "/system/etc/PCID.sc";
static const char *g_pcidPath = "/system/etc/PCID.sc";
static void FreeContextBuffer(char *contextBuffer)
{
@@ -136,7 +136,7 @@ bool EncodeOsSyscap(char *output, int len)
return false;
}
ret = GetFileContext(pcidPath, &contextBuffer, &bufferLen);
ret = GetFileContext(g_pcidPath, &contextBuffer, &bufferLen);
if (ret != 0) {
PRINT_ERR("GetFileContext failed, input file : /system/etc/PCID.sc\n");
return false;
@@ -160,7 +160,7 @@ bool EncodePrivateSyscap(char **output, int *outputLen)
char *outputStr = NULL;
uint32_t bufferLen;
ret = GetFileContext(pcidPath, &contextBuffer, &bufferLen);
ret = GetFileContext(g_pcidPath, &contextBuffer, &bufferLen);
if (ret != 0) {
PRINT_ERR("GetFileContext failed, input file : /system/etc/PCID.sc\n");
return false;