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_information_get 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 information */
46 /* get call. */
47 /* */
48 /* INPUT */
49 /* */
50 /* media_ptr Media control block pointer */
51 /* directory_name Directory name pointer */
52 /* attributes Pointer to attributes */
53 /* size Pointer to size */
54 /* year Pointer to year */
55 /* month Pointer to month */
56 /* day Pointer to day */
57 /* hour Pointer to hour */
58 /* minute Pointer to minute */
59 /* second Pointer to second */
60 /* */
61 /* OUTPUT */
62 /* */
63 /* return status */
64 /* */
65 /* CALLS */
66 /* */
67 /* _fx_directory_information_get Actual directory information */
68 /* get 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_information_get(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_information_get(FX_MEDIA *media_ptr, CHAR *directory_name,
84 UINT *attributes, ULONG *size,
85 UINT *year, UINT *month, UINT *day,
86 UINT *hour, UINT *minute, UINT *second)
87 {
88
89 UINT status;
90
91
92 /* Check for a null media pointer or all null return parameter pointers. */
93 if ((media_ptr == FX_NULL) ||
94 ((attributes == FX_NULL) && (size == FX_NULL) && (year == FX_NULL) && (month == FX_NULL) &&
95 (day == FX_NULL) && (hour == FX_NULL) && (minute == FX_NULL) && (second == FX_NULL)))
96 {
97 return(FX_PTR_ERROR);
98 }
99
100 /* Check for a valid caller. */
101 FX_CALLER_CHECKING_CODE
102
103 /* Call actual directory information get service. */
104 status = _fx_directory_information_get(media_ptr, directory_name, attributes, size,
105 year, month, day, hour, minute, second);
106
107 /* Directory information get is complete, return status. */
108 return(status);
109 }
110
111