mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-23 16:20:00 +00:00
commit
3aec004da3
@ -241,24 +241,28 @@ int FsDmCreateDevice(char **dmDevPath, const char *devName, DmVerityTarget *targ
|
||||
rc = CreateDmDevice(fd, devName);
|
||||
if (rc != 0) {
|
||||
BEGET_LOGE("error 0x%x, create dm device fail", rc);
|
||||
close(fd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = LoadDmDeviceTable(fd, devName, target);
|
||||
if (rc != 0) {
|
||||
BEGET_LOGE("error 0x%x, load device table fail", rc);
|
||||
close(fd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = ActiveDmDevice(fd, devName);
|
||||
if (rc != 0) {
|
||||
BEGET_LOGE("error 0x%x, active device fail", rc);
|
||||
close(fd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = GetDmDevPath(fd, dmDevPath, devName);
|
||||
if (rc != 0) {
|
||||
BEGET_LOGE("error 0x%x, get dm dev fail", rc);
|
||||
close(fd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -503,6 +503,7 @@ int FsHvbFinal(void)
|
||||
{
|
||||
if (g_vd != NULL) {
|
||||
hvb_chain_verify_data_free(g_vd);
|
||||
g_vd = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -307,6 +307,7 @@ static int CreateCtrlInfo(ServiceCtrlInfo **ctrlInfo, const char *cmd, uint32_t
|
||||
(*ctrlInfo)->valueOffset = offset;
|
||||
if (ret != 0 || len <= 0) {
|
||||
free(*ctrlInfo);
|
||||
*ctrlInfo = NULL;
|
||||
return -1;
|
||||
}
|
||||
(*ctrlInfo)->ctrlParam = ctrlParam;
|
||||
|
Loading…
Reference in New Issue
Block a user