GCC Code Coverage Report


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

fx_media_format_oem_name_set.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 /** Media */
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_media.h"
30
31
32 /* Define external reference to OEM name string. */
33
34 extern UCHAR _fx_media_format_oem_name[8];
35 UINT fx_media_format_oem_name_set(UCHAR new_oem_name[8]);
36
37 /**************************************************************************/
38 /* */
39 /* FUNCTION RELEASE */
40 /* */
41 /* _fx_media_format_oem_name_set PORTABLE C */
42 /* 6.1.5 */
43 /* AUTHOR */
44 /* */
45 /* William E. Lamie, Microsoft Corporation */
46 /* */
47 /* DESCRIPTION */
48 /* */
49 /* This function modifies the default OEM name for all formatting. The */
50 /* new OEM name must be 8 characters long - blank padded if necessary. */
51 /* */
52 /* */
53 /* INPUT */
54 /* */
55 /* new_oem_name Pointer to new OEM name */
56 /* */
57 /* OUTPUT */
58 /* */
59 /* Completion Status */
60 /* */
61 /* CALLS */
62 /* */
63 /* None */
64 /* */
65 /* CALLED BY */
66 /* */
67 /* Application Code */
68 /* */
69 /**************************************************************************/
70 9 UINT fx_media_format_oem_name_set(UCHAR new_oem_name[8])
71 {
72
73 UINT i;
74
75
76 /* Simply copy the new OEM name into the default location. */
77
2/2
✓ Branch 4 → 3 taken 72 times.
✓ Branch 4 → 5 taken 9 times.
81 for (i = 0; i < 8; i++)
78 {
79
80 /* Copy one character of the new OEM name. */
81 72 _fx_media_format_oem_name[i] = new_oem_name[i];
82 }
83
84 /* Return success. */
85 9 return(FX_SUCCESS);
86 }
87
88