GCC Code Coverage Report


Directory: common/src/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 6 / 0 / 6
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 8 / 0 / 8

fxe_directory_next_full_entry_find.c
Line Branch Exec Source
1 /***************************************************************************
2 * Copyright (c) 2024 Microsoft Corporation
3 * Copyright (c) 2026-present Eclipse ThreadX contributors
4 *
5 * This program and the accompanying materials are made available under the
6 * terms of the MIT License which is available at
7 * https://opensource.org/licenses/MIT.
8 *
9 * SPDX-License-Identifier: MIT
10 **************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** FileX Component */
17 /** */
18 /** Directory */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define FX_SOURCE_CODE
24
25
26 /* Include necessary system files. */
27
28 #include "fx_api.h"
29 #include "fx_directory.h"
30
31 FX_CALLER_CHECKING_EXTERNS
32
33
34 /**************************************************************************/
35 /* */
36 /* FUNCTION RELEASE */
37 /* */
38 /* _fxe_directory_next_full_entry_find PORTABLE C */
39 /* 6.1 */
40 /* AUTHOR */
41 /* */
42 /* William E. Lamie, Microsoft Corporation */
43 /* */
44 /* DESCRIPTION */
45 /* */
46 /* This function checks the next directory full entry find call for */
47 /* errors. */
48 /* */
49 /* INPUT */
50 /* */
51 /* media_ptr Media control block pointer */
52 /* directory_name Destination for directory */
53 /* name */
54 /* attributes Destination for attributes */
55 /* size Destination for size */
56 /* year Destination for year */
57 /* month Destination for month */
58 /* day Destination for day */
59 /* hour Destination for hour */
60 /* minute Destination for minute */
61 /* second Destination for second */
62 /* */
63 /* OUTPUT */
64 /* */
65 /* return status */
66 /* */
67 /* CALLS */
68 /* */
69 /* _fx_directory_next_full_entry_find Actual full entry find service*/
70 /* */
71 /* CALLED BY */
72 /* */
73 /* Application Code */
74 /* */
75 /**************************************************************************/
76 2430 UINT _fxe_directory_next_full_entry_find(FX_MEDIA *media_ptr,
77 CHAR *directory_name, UINT *attributes, ULONG *size,
78 UINT *year, UINT *month, UINT *day, UINT *hour, UINT *minute, UINT *second)
79 {
80
81 UINT status;
82
83
84 /* Check for a null media pointer. */
85
2/2
✓ Branch 2 → 3 taken 8 times.
✓ Branch 2 → 4 taken 2422 times.
2430 if (media_ptr == FX_NULL)
86 {
87 8 return(FX_PTR_ERROR);
88 }
89
90 /* Check for a valid caller. */
91
6/6
✓ Branch 4 → 5 taken 1556 times.
✓ Branch 4 → 7 taken 690 times.
✓ Branch 5 → 6 taken 866 times.
✓ Branch 5 → 7 taken 690 times.
✓ Branch 6 → 7 taken 690 times.
✓ Branch 6 → 8 taken 176 times.
2246 FX_CALLER_CHECKING_CODE
92
93 /* Call actual next directory full entry find service. */
94 352 status = _fx_directory_next_full_entry_find(media_ptr, directory_name,
95 attributes, size, year, month, day, hour, minute, second);
96
97 /* Return status to the caller. */
98 352 return(status);
99 }
100
101