Home
last modified time | relevance | path

Searched refs:rc (Results 1 – 25 of 74) sorted by relevance

123

/base/startup/init/interfaces/innerkits/fs_manager/libfs_dm/
Dfs_dm.c83 int rc; in CreateDmDevice() local
86 rc = InitDmIo(&io, devName); in CreateDmDevice()
87 if (rc != 0) { in CreateDmDevice()
88 return rc; in CreateDmDevice()
91 rc = ioctl(fd, DM_DEV_CREATE, &io); in CreateDmDevice()
92 if (rc != 0) { in CreateDmDevice()
93 BEGET_LOGE("error, DM_DEV_CREATE failed for %s, ret=%d", devName, rc); in CreateDmDevice()
94 return rc; in CreateDmDevice()
103 int rc; in LoadDmDeviceTable() local
126 rc = InitDmIo(io, devName); in LoadDmDeviceTable()
[all …]
/base/startup/init/interfaces/innerkits/fs_manager/dm_verity/
Ddm_verity.c43 int rc; in HvbDmVerityIsEnable() local
47rc = FsHvbGetValueFromCmdLine(&forceEnable[0], sizeof(forceEnable), HVB_CMDLINE_HVB_FORCE_ENABLE); in HvbDmVerityIsEnable()
48 if (rc == 0 && strcmp(&forceEnable[0], "factory") == 0) { in HvbDmVerityIsEnable()
52 rc = FsHvbGetValueFromCmdLine(&vBState[0], sizeof(vBState), HVB_CMDLINE_VB_STATE); in HvbDmVerityIsEnable()
54 if (rc != 0) { in HvbDmVerityIsEnable()
55 BEGET_LOGE("error 0x%x, get verifed boot state", rc); in HvbDmVerityIsEnable()
68 int rc; in HvbDmVerityinit() local
86 rc = FsHvbInit(); in HvbDmVerityinit()
87 if (rc != 0) { in HvbDmVerityinit()
88 BEGET_LOGE("init fs hvb error, ret=%d", rc); in HvbDmVerityinit()
[all …]
/base/security/appverify/interfaces/innerkits/appverify_lite/src/
Dmbedtls_pkcs7.c47 #define PKCS7_ERR_RETURN_WITH_LOG(rc) \ argument
49 if ((rc) != PKCS7_SUCC) \
51 LOG_ERROR("%s:%u, error occurred, ret:%d", __FUNCTION__, __LINE__, (rc)); \
52 return rc; \
122 int rc; in GetContentInfoType() local
124 rc = mbedtls_asn1_get_tag(p, end, &seqLen, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); in GetContentInfoType()
125 if (rc) { in GetContentInfoType()
126 return rc; in GetContentInfoType()
130 rc = mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_OID); in GetContentInfoType()
131 if (rc) { in GetContentInfoType()
[all …]
/base/global/resource_management/frameworks/resmgr/test/unittest/common/
Dresource_manager_test.cpp187 auto rc = CreateResConfig(); in AddResource() local
188 if (rc == nullptr) { in AddResource()
192 rc->SetLocaleInfo(language, script, region); in AddResource()
193 rm->UpdateResConfig(*rc); in AddResource()
194 delete rc; in AddResource()
203 auto rc = CreateResConfig(); in AddHapResource() local
204 if (rc == nullptr) { in AddHapResource()
208 rc->SetLocaleInfo(language, script, region); in AddHapResource()
209 rm->UpdateResConfig(*rc); in AddHapResource()
210 delete rc; in AddHapResource()
[all …]
Dhap_manager_test.cpp98 ResConfig *rc = CreateResConfig(); variable
99 if (rc == nullptr) {
103 rc->SetLocaleInfo("en", nullptr, "US");
108 delete (rc);
112 hapManager->UpdateResConfig(*rc);
121 delete (rc);
134 delete (rc);
154 delete (rc);
165 ResConfig *rc = CreateResConfig(); variable
166 if (rc == nullptr) {
[all …]
Dres_config_test.cpp66 ResConfigImpl *rc = new ResConfigImpl; variable
67 rc->SetLocaleInfo("en", nullptr, "AU");
72 EXPECT_TRUE(rc->Match(current));
73 EXPECT_TRUE(!(rc->Match(target)));
76 delete rc;
/base/hiviewdfx/hiview/adapter/dbstore/
Ddoc_db.cpp56 iwrc rc = ejdb_init(); in OpenDB() local
57 if (rc) { in OpenDB()
58 iwlog_ecode_error3(rc); in OpenDB()
59 HiLog::Error(LABEL, "ejdb init failed, reason:%{public}s", iwlog_ecode_explained(rc)); in OpenDB()
60 return MapErrorCode(rc); in OpenDB()
63 rc = ejdb_open(&opts, &db_); in OpenDB()
64 if (rc) { in OpenDB()
65 iwlog_ecode_error3(rc); in OpenDB()
66 HiLog::Error(LABEL, "open ejdb failed, reason:%{public}s", iwlog_ecode_explained(rc)); in OpenDB()
67 return MapErrorCode(rc); in OpenDB()
[all …]
Ddoc_store.cpp77 iwrc rc = 0; in Put() local
78 rc = jbl_from_json(&jbl, entry.value.c_str()); in Put()
79 RCGO(rc, FINISH); in Put()
81 rc = ejdb_put_new(dbPtr->db_, coll, jbl, const_cast<int64_t*>(&entry.id)); in Put()
82 RCGO(rc, FINISH); in Put()
88 if (rc != 0) { in Put()
89 iwlog_ecode_error3(rc); in Put()
90 … HiLog::Error(LABEL, "put data to doc store failed, reason:%{public}s", iwlog_ecode_explained(rc)); in Put()
91 return MapErrorCode(rc); in Put()
120 iwrc rc = ejdb_patch(dbPtr->db_, coll, entry.value.c_str(), entry.id); in Merge() local
[all …]
Ddoc_util.cpp21 int MapErrorCode(iwrc rc) in MapErrorCode() argument
23 switch (rc) { in MapErrorCode()
/base/startup/init/interfaces/innerkits/fs_manager/libfs_hvb/
Dfs_hvb.c174 enum hvb_errno rc; in FsHvbInit() local
182 rc = hvb_chain_verify(FsHvbGetOps(), FS_HVB_RVT_PARTITION_NAME, NULL, &g_vd); in FsHvbInit()
184 BEGET_LOGE("error 0x%x, hvb chain verify, vd is NULL", rc); in FsHvbInit()
185 return rc; in FsHvbInit()
188 if (rc != HVB_OK) { in FsHvbInit()
189 BEGET_LOGE("error 0x%x, hvb chain verify", rc); in FsHvbInit()
192 return rc; in FsHvbInit()
195 rc = FsHvbCheckCertChainDigest(g_vd->certs, g_vd->num_loaded_certs); in FsHvbInit()
196 if (rc != 0) { in FsHvbInit()
197 BEGET_LOGE("error 0x%x, cert chain hash", rc); in FsHvbInit()
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_status.c238 int32_t rc = CMR_OK; in ReadFile() local
250 rc = CMR_ERROR_STORAGE; in ReadFile()
257 rc = CMR_ERROR_MALLOC_FAIL; in ReadFile()
263 rc = CMR_ERROR_STORAGE; in ReadFile()
268 if (rc != CMR_OK) { in ReadFile()
274 return rc; in ReadFile()
279 int32_t rc = CMR_OK; in LoadTreeStatus() local
309 rc = RbTreeDecode(tree, DecodeStatus, DecodeFreeStatus, data, dataLen); in LoadTreeStatus()
312 if (rc != CMR_OK) { in LoadTreeStatus()
313 CM_LOG_E("Failed to decode status tree: %d", rc); in LoadTreeStatus()
[all …]
/base/update/updater/test/unittest/applypatch_test/
Dimagepatch_unittest.cpp64 auto rc = ReadContentFromFile("/data/updater/applypatch/source.zip", sourceData); in TestZipModeImagePatch() local
65 EXPECT_TRUE(rc); in TestZipModeImagePatch()
70 rc = ReadContentFromFile(patchFile, patchContent); in TestZipModeImagePatch()
71 EXPECT_TRUE(rc); in TestZipModeImagePatch()
83 auto rc = ReadContentFromFile("/data/updater/diffpatch/patchtest.old", sourceData); in TestNormalModeImagePatch() local
84 EXPECT_TRUE(rc); in TestNormalModeImagePatch()
87 rc = ReadContentFromFile(patchFile, patchContent); in TestNormalModeImagePatch()
88 EXPECT_TRUE(rc); in TestNormalModeImagePatch()
100 …auto rc = ReadContentFromFile("/data/updater/applypatch/TestGZipModeImagePatch.old.gz", sourceData… in TestGZipModeImagePatch() local
101 EXPECT_TRUE(rc); in TestGZipModeImagePatch()
[all …]
/base/startup/init/interfaces/innerkits/fs_manager/
Dfstab_mount.c282 int rc = -1; in Mount() local
302 if ((rc = mount(source, target, fsType, flags, data)) != 0) { in Mount()
303 BEGET_WARNING_CHECK(errno != EBUSY, rc = 0, "Mount %s to %s busy, ignore", source, target); in Mount()
305 return rc; in Mount()
412 int rc = Mount(item->deviceName, item->mountPoint, item->fsType, mountFlags, fsSpecificData); in MountOneItem() local
413 if (rc != 0) { in MountOneItem()
418 rc = 0; in MountOneItem()
423 return rc; in MountOneItem()
443 int rc = 0; in CheckRequiredAndMount() local
453 rc = HvbDmVeritySetUp(item); in CheckRequiredAndMount()
[all …]
/base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/
Dhap_manager_test.cpp97 ResConfig *rc = CreateResConfig(); variable
98 if (rc == nullptr) {
102 rc->SetLocaleInfo("en", nullptr, "US");
107 delete (rc);
111 hapManager->UpdateResConfig(*rc);
120 delete (rc);
133 delete (rc);
153 delete (rc);
Dres_config_test.cpp66 ResConfigImpl *rc = new ResConfigImpl; variable
67 rc->SetLocaleInfo("en", nullptr, "AU");
72 EXPECT_TRUE(rc->Match(current));
73 EXPECT_TRUE(!(rc->Match(target)));
76 delete rc;
Dresource_manager_test.cpp106 auto rc = CreateResConfig(); in AddResource() local
107 if (rc == nullptr) { in AddResource()
111 rc->SetLocaleInfo(language, script, region); in AddResource()
112 rm->UpdateResConfig(*rc); in AddResource()
113 delete rc; in AddResource()
219 ResConfig *rc = CreateResConfig(); variable
220 if (rc == nullptr) {
224 rc->SetLocaleInfo("en", nullptr, "US");
225 rc->SetDeviceType(DeviceType::DEVICE_CAR);
226 state = rm->UpdateResConfig(*rc);
[all …]
/base/startup/appspawn/adapter/
Dappspawn_sandbox.cpp42 bool rc = JsonUtils::GetJsonObjFromJson(appSandboxConfig, APP_JSON_CONFIG); in LoadAppSandboxConfig() local
43 APPSPAWN_CHECK_ONLY_LOG(rc, "AppSpawnServer::Failed to load app private sandbox config"); in LoadAppSandboxConfig()
46 rc = JsonUtils::GetJsonObjFromJson(appSandboxConfig, PRODUCT_JSON_CONFIG); in LoadAppSandboxConfig()
47 APPSPAWN_CHECK_ONLY_LOG(rc, "AppSpawnServer::Failed to load app product sandbox config"); in LoadAppSandboxConfig()
51 rc = JsonUtils::GetJsonObjFromJson(appNamespaceConfig, NAMESPACE_JSON_CONFIG); in LoadAppSandboxConfig()
52 APPSPAWN_CHECK_ONLY_LOG(rc, "AppSpawnServer::Failed to load app sandbox namespace config"); in LoadAppSandboxConfig()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/
Dcert_manager_status.h49 #define CM_ERROR(rc) (int32_t) (rc) argument
56 #define TRY_FUNC(f, rc) do { \ argument
57 (rc) = (f); if ((rc)) { CM_LOG_W("Failed: %s, %d\n", #f, (rc)); goto finally; }} while (0)
65 #define TRY_HKS_CALL(f, rc) do {int32_t _rc = (f); if ((_rc) != HKS_SUCCESS) { \ argument
66 CM_LOG_W("Failed: %s, %d\n", #f, (_rc)); (rc) = CM_ERROR((_rc)); goto finally; }} while (0)
/base/startup/init/test/unittest/ueventd/
Dueventd_config_unittest.cpp75 int rc = ParseUeventConfig(const_cast<char*>(file.c_str())); // Invalid section variable
76 EXPECT_EQ(rc, -1);
78 rc = ParseUeventConfig(const_cast<char*>(file.c_str())); // Unknown section
79 EXPECT_EQ(rc, -1);
81 rc = ParseUeventConfig(const_cast<char*>(file.c_str())); // valid section
82 EXPECT_EQ(rc, 0);
/base/startup/appspawn/util/src/
Dsandbox_utils.cpp245 bool rc = JsonUtils::GetStringFromJson(jsonConfig, g_destMode, fileModeStr); in DoSandboxChmod() local
246 if (rc == false) { in DoSandboxChmod()
732 int rc = 0; in SetCommonAppSandboxProperty_() local
734 rc = DoSandboxFileCommonBind(appProperty, config); in SetCommonAppSandboxProperty_()
735 … APPSPAWN_CHECK(rc == 0, return rc, "DoSandboxFileCommonBind failed, %s", appProperty->bundleName); in SetCommonAppSandboxProperty_()
739 rc = DoSandboxFileCommonSymlink(appProperty, config); in SetCommonAppSandboxProperty_()
740 …APPSPAWN_CHECK(rc == 0, return rc, "DoSandboxFileCommonSymlink failed, %s", appProperty->bundleNam… in SetCommonAppSandboxProperty_()
743 rc = DoSandboxFileCommonFlagsPointHandle(appProperty, config); in SetCommonAppSandboxProperty_()
744 APPSPAWN_CHECK_ONLY_LOG(rc == 0, "DoSandboxFilePrivateFlagsPointHandle failed"); in SetCommonAppSandboxProperty_()
746 return rc; in SetCommonAppSandboxProperty_()
[all …]
/base/startup/init/services/init/standard/
Dinit_mount.c29 int rc; in MountRequriedPartitions() local
31 rc = MountAllWithFstab(fstab, 1); in MountRequriedPartitions()
32 return rc; in MountRequriedPartitions()
/base/startup/init/ueventd/
Dueventd_device_handler.c75 int rc = symlink(deviceNode, linkName); in CreateSymbolLinks() local
76 if (rc != 0) { in CreateSymbolLinks()
101 int rc = 0; in SetDeviceLable() local
123 rc += Restorecon(buffer); in SetDeviceLable()
127 rc += Restorecon(path); in SetDeviceLable()
128 if (rc != 0) { in SetDeviceLable()
138 int rc = -1; in CreateDeviceNode() local
147 return rc; in CreateDeviceNode()
153 return rc; in CreateDeviceNode()
159 return rc; in CreateDeviceNode()
[all …]
/base/startup/init/services/modules/seccomp/
Dseccomp_policy.c101 int rc = snprintf_s(filterLibPath, sizeof(filterLibPath), \ in GetFilterFileByName() local
104 if (rc == -1) { in GetFilterFileByName()
129 int rc = snprintf_s(filterVaribleName, sizeof(filterVaribleName), \ in GetSeccompPolicy() local
132 if (rc == -1) { in GetSeccompPolicy()
149 rc = strcat_s(filterVaribleName, strlen(filterVaribleName) + \ in GetSeccompPolicy()
151 if (rc != 0) { in GetSeccompPolicy()
/base/security/device_auth/common_lib/impl/src/
Dhc_parcel.c114 errno_t rc; in ParcelRead() local
124 rc = memmove_s(dst, dataSize, parcel->data + parcel->beginPos, dataSize); in ParcelRead()
125 if (rc != EOK) { in ParcelRead()
134 errno_t rc; in ParcelEraseBlock() local
148 rc = memmove_s(dst, dataSize, beginCopy, dataSize); in ParcelEraseBlock()
149 if (rc != EOK) { in ParcelEraseBlock()
153 rc = memmove_s(beginCopy, copySize, beginCopy + dataSize, copySize); in ParcelEraseBlock()
154 if (rc != EOK) { in ParcelEraseBlock()
174 errno_t rc; in ParcelWriteRevert() local
179 rc = memmove_s(srcCopy, dataSize, src, dataSize); in ParcelWriteRevert()
[all …]
/base/update/updater/services/fs_manager/
Dmount.cpp96 MountStatus rc = GetMountStatusForMountPoint(item->mountPoint); in UmountForPath() local
97 if (rc == MOUNT_ERROR) { in UmountForPath()
99 } else if (rc == MOUNT_UMOUNTED) { in UmountForPath()
121 MountStatus rc = GetMountStatusForMountPoint(item->mountPoint); in MountForPath() local
122 if (rc == MountStatus::MOUNT_ERROR) { in MountForPath()
124 } else if (rc == MountStatus::MOUNT_MOUNTED) { in MountForPath()

123