1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * SPDX-License-Identifier: GPL-2.0
4  *
5  * Unless required by applicable law or agreed to in writing, software
6  * distributed under the License is distributed on an "AS IS" BASIS,
7  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8  * See the License for the specific language governing permissions and
9  * limitations under the License.
10  */
11 
12 #include <cstddef>
13 #include <cstdint>
14 #include "hccommon.h"
15 
16 const char *g_hcEnable = "/sys/fs/f2fs/loop1/hc_enable";
17 
18 namespace OHOS {
HcEnableFuzzer(const uint8_t *data, size_t size)19 bool HcEnableFuzzer(const uint8_t *data, size_t size)
20 {
21     bool ret = HcFuzzTest(data, g_hcEnable, size);
22     return ret;
23 }
24 } // namespace OHOS
25 
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)26 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
27 {
28     OHOS::HcEnableFuzzer(data, size);
29     return 0;
30 }
31