1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** FileX Component                                                       */
16 /**                                                                       */
17 /**   Media                                                               */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 #define FX_SOURCE_CODE
23 
24 
25 /* Include necessary system files.  */
26 
27 #include "fx_api.h"
28 #include "fx_media.h"
29 
30 
31 /* Define external reference to OEM name string.  */
32 
33 extern UCHAR   _fx_media_format_oem_name[8];
34 UINT  fx_media_format_oem_name_set(UCHAR new_oem_name[8]);
35 
36 /**************************************************************************/
37 /*                                                                        */
38 /*  FUNCTION                                               RELEASE        */
39 /*                                                                        */
40 /*    _fx_media_format_oem_name_set                       PORTABLE C      */
41 /*                                                           6.1.5        */
42 /*  AUTHOR                                                                */
43 /*                                                                        */
44 /*    William E. Lamie, Microsoft Corporation                             */
45 /*                                                                        */
46 /*  DESCRIPTION                                                           */
47 /*                                                                        */
48 /*    This function modifies the default OEM name for all formatting. The */
49 /*    new OEM name must be 8 characters long - blank padded if necessary. */
50 /*                                                                        */
51 /*                                                                        */
52 /*  INPUT                                                                 */
53 /*                                                                        */
54 /*    new_oem_name                          Pointer to new OEM name       */
55 /*                                                                        */
56 /*  OUTPUT                                                                */
57 /*                                                                        */
58 /*    Completion Status                                                   */
59 /*                                                                        */
60 /*  CALLS                                                                 */
61 /*                                                                        */
62 /*    None                                                                */
63 /*                                                                        */
64 /*  CALLED BY                                                             */
65 /*                                                                        */
66 /*    Application Code                                                    */
67 /*                                                                        */
68 /*  RELEASE HISTORY                                                       */
69 /*                                                                        */
70 /*    DATE              NAME                      DESCRIPTION             */
71 /*                                                                        */
72 /*  05-19-2020     William E. Lamie         Initial Version 6.0           */
73 /*  09-30-2020     William E. Lamie         Modified comment(s),          */
74 /*                                            resulting in version 6.1    */
75 /*  03-02-2021     William E. Lamie         Modified comment(s),          */
76 /*                                            resulting in version 6.1.5  */
77 /*                                                                        */
78 /**************************************************************************/
fx_media_format_oem_name_set(UCHAR new_oem_name[8])79 UINT  fx_media_format_oem_name_set(UCHAR new_oem_name[8])
80 {
81 
82 UINT i;
83 
84 
85     /* Simply copy the new OEM name into the default location.  */
86     for (i = 0; i < 8; i++)
87     {
88 
89         /* Copy one character of the new OEM name.  */
90         _fx_media_format_oem_name[i] =  new_oem_name[i];
91     }
92 
93     /* Return success.  */
94     return(FX_SUCCESS);
95 }
96 
97