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 /**   Directory                                                           */
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_directory.h"
29 
30 FX_CALLER_CHECKING_EXTERNS
31 
32 
33 /**************************************************************************/
34 /*                                                                        */
35 /*  FUNCTION                                               RELEASE        */
36 /*                                                                        */
37 /*    _fxe_directory_first_full_entry_find                PORTABLE C      */
38 /*                                                           6.1          */
39 /*  AUTHOR                                                                */
40 /*                                                                        */
41 /*    William E. Lamie, Microsoft Corporation                             */
42 /*                                                                        */
43 /*  DESCRIPTION                                                           */
44 /*                                                                        */
45 /*    This function checks for errors in the directory find first full    */
46 /*    entry call.                                                         */
47 /*                                                                        */
48 /*  INPUT                                                                 */
49 /*                                                                        */
50 /*    media_ptr                             Media control block pointer   */
51 /*    directory_name                        Destination for directory     */
52 /*                                            name                        */
53 /*    attributes                            Destination for attributes    */
54 /*    size                                  Destination for size          */
55 /*    year                                  Destination for year          */
56 /*    month                                 Destination for month         */
57 /*    day                                   Destination for day           */
58 /*    hour                                  Destination for hour          */
59 /*    minute                                Destination for minute        */
60 /*    second                                Destination for second        */
61 /*                                                                        */
62 /*  OUTPUT                                                                */
63 /*                                                                        */
64 /*    return status                                                       */
65 /*                                                                        */
66 /*  CALLS                                                                 */
67 /*                                                                        */
68 /*    _fx_directory_first_full_entry_find   Actual first find service     */
69 /*                                                                        */
70 /*  CALLED BY                                                             */
71 /*                                                                        */
72 /*    Application Code                                                    */
73 /*                                                                        */
74 /*  RELEASE HISTORY                                                       */
75 /*                                                                        */
76 /*    DATE              NAME                      DESCRIPTION             */
77 /*                                                                        */
78 /*  05-19-2020     William E. Lamie         Initial Version 6.0           */
79 /*  09-30-2020     William E. Lamie         Modified comment(s),          */
80 /*                                            resulting in version 6.1    */
81 /*                                                                        */
82 /**************************************************************************/
_fxe_directory_first_full_entry_find(FX_MEDIA * media_ptr,CHAR * directory_name,UINT * attributes,ULONG * size,UINT * year,UINT * month,UINT * day,UINT * hour,UINT * minute,UINT * second)83 UINT  _fxe_directory_first_full_entry_find(FX_MEDIA *media_ptr,
84                                            CHAR *directory_name, UINT *attributes, ULONG *size,
85                                            UINT *year, UINT *month, UINT *day, UINT *hour, UINT *minute, UINT *second)
86 {
87 
88 UINT status;
89 
90 
91     /* Check for a null media pointer.  */
92     if (media_ptr == FX_NULL)
93     {
94         return(FX_PTR_ERROR);
95     }
96 
97     /* Check for a valid caller.  */
98     FX_CALLER_CHECKING_CODE
99 
100     /* Call actual directory find first full entry service.  */
101     status =  _fx_directory_first_full_entry_find(media_ptr, directory_name,
102                                                   attributes, size, year, month, day, hour, minute, second);
103 
104     /* Return status to the caller.  */
105     return(status);
106 }
107 
108