• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2023 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #include "hdf_emmc_entry_test.h"
10 #include "emmc_test.h"
11 #include "hdf_log.h"
12 
13 #define HDF_LOG_TAG hdf_emmc_entry_test
14 
HdfEmmcUnitTestEntry(HdfTestMsg * msg)15 int32_t HdfEmmcUnitTestEntry(HdfTestMsg *msg)
16 {
17     struct EmmcTester *tester = NULL;
18 
19     if (msg == NULL) {
20         HDF_LOGE("HdfEmmcUnitTestEntry: msg is null!");
21         return HDF_FAILURE;
22     }
23     tester = GetEmmcTester();
24     if (tester == NULL || tester->TestEntry == NULL) {
25         HDF_LOGE("HdfEmmcUnitTestEntry: tester or TestEntry is null!");
26         msg->result = HDF_FAILURE;
27         return HDF_FAILURE;
28     }
29     msg->result = tester->TestEntry(tester, msg->subCmd);
30     return msg->result;
31 }
32