mirror of
https://gitee.com/openharmony/xts_tools
synced 2024-11-23 07:50:08 +00:00
!534 新增PCS 相关字段异常返回值打印,保证可视化报告的归一化
Merge pull request !534 from quxianfei/local_20241020_0004
This commit is contained in:
commit
31c75014fa
@ -30,46 +30,64 @@ void ObtainProductParms(void)
|
|||||||
int sdkApiVersion = GetSdkApiVersion();
|
int sdkApiVersion = GetSdkApiVersion();
|
||||||
if (sdkApiVersion != 0) {
|
if (sdkApiVersion != 0) {
|
||||||
printf("SdkApiVersion = %d\n", sdkApiVersion);
|
printf("SdkApiVersion = %d\n", sdkApiVersion);
|
||||||
|
} else {
|
||||||
|
printf("SdkApiVersion = 0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int firstApiVersion = GetFirstApiVersion();
|
int firstApiVersion = GetFirstApiVersion();
|
||||||
if (firstApiVersion != 0) {
|
if (firstApiVersion != 0) {
|
||||||
printf("firstApiVersion = %d\n", firstApiVersion);
|
printf("firstApiVersion = %d\n", firstApiVersion);
|
||||||
|
} else {
|
||||||
|
printf("firstApiVersion = 0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *bootloaderVersion = GetBootloaderVersion();
|
const char *bootloaderVersion = GetBootloaderVersion();
|
||||||
if (bootloaderVersion != nullptr) {
|
if (bootloaderVersion != nullptr) {
|
||||||
printf("bootloaderVersion = %s\n", bootloaderVersion);
|
printf("bootloaderVersion = %s\n", bootloaderVersion);
|
||||||
|
} else {
|
||||||
|
printf("bootloaderVersion = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *incrementalVersion = GetIncrementalVersion();
|
const char *incrementalVersion = GetIncrementalVersion();
|
||||||
if (incrementalVersion != nullptr) {
|
if (incrementalVersion != nullptr) {
|
||||||
printf("incrementalVersion = %s\n", incrementalVersion);
|
printf("incrementalVersion = %s\n", incrementalVersion);
|
||||||
|
} else {
|
||||||
|
printf("incrementalVersion = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *buildType = GetBuildType();
|
const char *buildType = GetBuildType();
|
||||||
if (buildType != nullptr) {
|
if (buildType != nullptr) {
|
||||||
printf("buildType = %s\n", buildType);
|
printf("buildType = %s\n", buildType);
|
||||||
|
} else {
|
||||||
|
printf("buildType = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *buildUser = GetBuildUser();
|
const char *buildUser = GetBuildUser();
|
||||||
if (buildUser != nullptr) {
|
if (buildUser != nullptr) {
|
||||||
printf("buildUser = %s\n", buildUser);
|
printf("buildUser = %s\n", buildUser);
|
||||||
|
} else {
|
||||||
|
printf("buildUser = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *buildHost = GetBuildHost();
|
const char *buildHost = GetBuildHost();
|
||||||
if (buildHost != nullptr) {
|
if (buildHost != nullptr) {
|
||||||
printf("buildHost = %s\n", buildHost);
|
printf("buildHost = %s\n", buildHost);
|
||||||
|
} else {
|
||||||
|
printf("buildHost = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *buildTime = GetBuildTime();
|
const char *buildTime = GetBuildTime();
|
||||||
if (buildTime != nullptr) {
|
if (buildTime != nullptr) {
|
||||||
printf("buildTime = %s\n", buildTime);
|
printf("buildTime = %s\n", buildTime);
|
||||||
|
} else {
|
||||||
|
printf("buildTime = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *abiList = GetAbiList();
|
const char *abiList = GetAbiList();
|
||||||
if (abiList != nullptr) {
|
if (abiList != nullptr) {
|
||||||
printf("AbiList = %s\n", abiList);
|
printf("AbiList = %s\n", abiList);
|
||||||
|
} else {
|
||||||
|
printf("AbiList = nullptr\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,26 +97,36 @@ int main()
|
|||||||
const char *productType = GetDeviceType();
|
const char *productType = GetDeviceType();
|
||||||
if (productType != nullptr) {
|
if (productType != nullptr) {
|
||||||
printf("Device Type = %s\n", productType);
|
printf("Device Type = %s\n", productType);
|
||||||
|
} else {
|
||||||
|
printf("Device Type = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *securityPatchTag = GetSecurityPatchTag();
|
const char *securityPatchTag = GetSecurityPatchTag();
|
||||||
if (securityPatchTag != nullptr) {
|
if (securityPatchTag != nullptr) {
|
||||||
printf("Security Patch = %s\n", securityPatchTag);
|
printf("Security Patch = %s\n", securityPatchTag);
|
||||||
|
} else {
|
||||||
|
printf("Security Patch = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *osName = GetOSFullName();
|
const char *osName = GetOSFullName();
|
||||||
if (osName != nullptr) {
|
if (osName != nullptr) {
|
||||||
printf("OsFullName = %s\n", osName);
|
printf("OsFullName = %s\n", osName);
|
||||||
|
} else {
|
||||||
|
printf("OsFullName = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *displayVersion = GetDisplayVersion();
|
const char *displayVersion = GetDisplayVersion();
|
||||||
if (displayVersion != nullptr) {
|
if (displayVersion != nullptr) {
|
||||||
printf("DisplayVersion = %s\n", displayVersion);
|
printf("DisplayVersion = %s\n", displayVersion);
|
||||||
|
} else {
|
||||||
|
printf("DisplayVersion = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *versionId = GetVersionId();
|
const char *versionId = GetVersionId();
|
||||||
if (versionId != nullptr) {
|
if (versionId != nullptr) {
|
||||||
printf("VersionID = %s\n", versionId);
|
printf("VersionID = %s\n", versionId);
|
||||||
|
} else {
|
||||||
|
printf("VersionID = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
AttestResultInfo attestResultInfo;
|
AttestResultInfo attestResultInfo;
|
||||||
@ -110,51 +138,71 @@ int main()
|
|||||||
int ret = GetDevUdid(udid, UDIDSIZE_LEN + 1);
|
int ret = GetDevUdid(udid, UDIDSIZE_LEN + 1);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
printf("DevUdid = %s\n", udid);
|
printf("DevUdid = %s\n", udid);
|
||||||
|
} else {
|
||||||
|
printf("DevUdid = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *manuFacture = GetManufacture();
|
const char *manuFacture = GetManufacture();
|
||||||
if (manuFacture != nullptr) {
|
if (manuFacture != nullptr) {
|
||||||
printf("manuFacture = %s\n", manuFacture);
|
printf("manuFacture = %s\n", manuFacture);
|
||||||
|
} else {
|
||||||
|
printf("manuFacture = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *productModel = GetProductModel();
|
const char *productModel = GetProductModel();
|
||||||
if (productModel != nullptr) {
|
if (productModel != nullptr) {
|
||||||
printf("productModel = %s\n", productModel);
|
printf("productModel = %s\n", productModel);
|
||||||
|
} else {
|
||||||
|
printf("productModel = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *serial = GetSerial();
|
const char *serial = GetSerial();
|
||||||
if (serial != nullptr) {
|
if (serial != nullptr) {
|
||||||
printf("serial = %s\n", serial);
|
printf("serial = %s\n", serial);
|
||||||
|
} else {
|
||||||
|
printf("serial = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *brand = GetBrand();
|
const char *brand = GetBrand();
|
||||||
if (brand != nullptr) {
|
if (brand != nullptr) {
|
||||||
printf("brand = %s\n", brand);
|
printf("brand = %s\n", brand);
|
||||||
|
} else {
|
||||||
|
printf("brand = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *productSeries = GetProductSeries();
|
const char *productSeries = GetProductSeries();
|
||||||
if (productSeries != nullptr) {
|
if (productSeries != nullptr) {
|
||||||
printf("productSeries = %s\n", productSeries);
|
printf("productSeries = %s\n", productSeries);
|
||||||
|
} else {
|
||||||
|
printf("productSeries = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *softwareModel = GetSoftwareModel();
|
const char *softwareModel = GetSoftwareModel();
|
||||||
if (softwareModel != nullptr) {
|
if (softwareModel != nullptr) {
|
||||||
printf("softwareModel = %s\n", softwareModel);
|
printf("softwareModel = %s\n", softwareModel);
|
||||||
|
} else {
|
||||||
|
printf("softwareModel = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *hardWareModel = GetHardwareModel();
|
const char *hardWareModel = GetHardwareModel();
|
||||||
if (hardWareModel != nullptr) {
|
if (hardWareModel != nullptr) {
|
||||||
printf("HardwareModel = %s\n", hardWareModel);
|
printf("HardwareModel = %s\n", hardWareModel);
|
||||||
|
} else {
|
||||||
|
printf("HardwareModel = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *buildRootHash = GetBuildRootHash();
|
const char *buildRootHash = GetBuildRootHash();
|
||||||
if (buildRootHash != nullptr) {
|
if (buildRootHash != nullptr) {
|
||||||
printf("BuildRootHash = %s\n", buildRootHash);
|
printf("BuildRootHash = %s\n", buildRootHash);
|
||||||
|
} else {
|
||||||
|
printf("BuildRootHash = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *marketName = GetMarketName();
|
const char *marketName = GetMarketName();
|
||||||
if (marketName != nullptr) {
|
if (marketName != nullptr) {
|
||||||
printf("marketName = %s\n", marketName);
|
printf("marketName = %s\n", marketName);
|
||||||
|
} else {
|
||||||
|
printf("marketName = nullptr\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ObtainProductParms();
|
ObtainProductParms();
|
||||||
|
Loading…
Reference in New Issue
Block a user