!534 新增PCS 相关字段异常返回值打印,保证可视化报告的归一化

Merge pull request !534 from quxianfei/local_20241020_0004
This commit is contained in:
openharmony_ci 2024-10-20 08:23:22 +00:00 committed by Gitee
commit 31c75014fa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -30,46 +30,64 @@ void ObtainProductParms(void)
int sdkApiVersion = GetSdkApiVersion();
if (sdkApiVersion != 0) {
printf("SdkApiVersion = %d\n", sdkApiVersion);
} else {
printf("SdkApiVersion = 0\n");
}
int firstApiVersion = GetFirstApiVersion();
if (firstApiVersion != 0) {
printf("firstApiVersion = %d\n", firstApiVersion);
} else {
printf("firstApiVersion = 0\n");
}
const char *bootloaderVersion = GetBootloaderVersion();
if (bootloaderVersion != nullptr) {
printf("bootloaderVersion = %s\n", bootloaderVersion);
} else {
printf("bootloaderVersion = nullptr\n");
}
const char *incrementalVersion = GetIncrementalVersion();
if (incrementalVersion != nullptr) {
printf("incrementalVersion = %s\n", incrementalVersion);
} else {
printf("incrementalVersion = nullptr\n");
}
const char *buildType = GetBuildType();
if (buildType != nullptr) {
printf("buildType = %s\n", buildType);
} else {
printf("buildType = nullptr\n");
}
const char *buildUser = GetBuildUser();
if (buildUser != nullptr) {
printf("buildUser = %s\n", buildUser);
} else {
printf("buildUser = nullptr\n");
}
const char *buildHost = GetBuildHost();
if (buildHost != nullptr) {
printf("buildHost = %s\n", buildHost);
} else {
printf("buildHost = nullptr\n");
}
const char *buildTime = GetBuildTime();
if (buildTime != nullptr) {
printf("buildTime = %s\n", buildTime);
} else {
printf("buildTime = nullptr\n");
}
const char *abiList = GetAbiList();
if (abiList != nullptr) {
printf("AbiList = %s\n", abiList);
} else {
printf("AbiList = nullptr\n");
}
}
@ -79,26 +97,36 @@ int main()
const char *productType = GetDeviceType();
if (productType != nullptr) {
printf("Device Type = %s\n", productType);
} else {
printf("Device Type = nullptr\n");
}
const char *securityPatchTag = GetSecurityPatchTag();
if (securityPatchTag != nullptr) {
printf("Security Patch = %s\n", securityPatchTag);
} else {
printf("Security Patch = nullptr\n");
}
const char *osName = GetOSFullName();
if (osName != nullptr) {
printf("OsFullName = %s\n", osName);
} else {
printf("OsFullName = nullptr\n");
}
const char *displayVersion = GetDisplayVersion();
if (displayVersion != nullptr) {
printf("DisplayVersion = %s\n", displayVersion);
} else {
printf("DisplayVersion = nullptr\n");
}
const char *versionId = GetVersionId();
if (versionId != nullptr) {
printf("VersionID = %s\n", versionId);
} else {
printf("VersionID = nullptr\n");
}
AttestResultInfo attestResultInfo;
@ -110,51 +138,71 @@ int main()
int ret = GetDevUdid(udid, UDIDSIZE_LEN + 1);
if (ret == 0) {
printf("DevUdid = %s\n", udid);
} else {
printf("DevUdid = nullptr\n");
}
const char *manuFacture = GetManufacture();
if (manuFacture != nullptr) {
printf("manuFacture = %s\n", manuFacture);
} else {
printf("manuFacture = nullptr\n");
}
const char *productModel = GetProductModel();
if (productModel != nullptr) {
printf("productModel = %s\n", productModel);
} else {
printf("productModel = nullptr\n");
}
const char *serial = GetSerial();
if (serial != nullptr) {
printf("serial = %s\n", serial);
} else {
printf("serial = nullptr\n");
}
const char *brand = GetBrand();
if (brand != nullptr) {
printf("brand = %s\n", brand);
} else {
printf("brand = nullptr\n");
}
const char *productSeries = GetProductSeries();
if (productSeries != nullptr) {
printf("productSeries = %s\n", productSeries);
} else {
printf("productSeries = nullptr\n");
}
const char *softwareModel = GetSoftwareModel();
if (softwareModel != nullptr) {
printf("softwareModel = %s\n", softwareModel);
} else {
printf("softwareModel = nullptr\n");
}
const char *hardWareModel = GetHardwareModel();
if (hardWareModel != nullptr) {
printf("HardwareModel = %s\n", hardWareModel);
} else {
printf("HardwareModel = nullptr\n");
}
const char *buildRootHash = GetBuildRootHash();
if (buildRootHash != nullptr) {
printf("BuildRootHash = %s\n", buildRootHash);
} else {
printf("BuildRootHash = nullptr\n");
}
const char *marketName = GetMarketName();
if (marketName != nullptr) {
printf("marketName = %s\n", marketName);
} else {
printf("marketName = nullptr\n");
}
ObtainProductParms();