GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: fxe_directory_information_get.c Lines: 8 8 100.0 %
Date: 2024-01-10 21:53:23 Branches: 24 24 100.0 %

Line Branch Exec Source
1
/**************************************************************************/
2
/*                                                                        */
3
/*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4
/*                                                                        */
5
/*       This software is licensed under the Microsoft Software License   */
6
/*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7
/*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8
/*       and in the root directory of this software.                      */
9
/*                                                                        */
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_information_get                      PORTABLE C      */
39
/*                                                           6.1          */
40
/*  AUTHOR                                                                */
41
/*                                                                        */
42
/*    William E. Lamie, Microsoft Corporation                             */
43
/*                                                                        */
44
/*  DESCRIPTION                                                           */
45
/*                                                                        */
46
/*    This function checks for errors in the directory information        */
47
/*    get call.                                                           */
48
/*                                                                        */
49
/*  INPUT                                                                 */
50
/*                                                                        */
51
/*    media_ptr                             Media control block pointer   */
52
/*    directory_name                        Directory name pointer        */
53
/*    attributes                            Pointer to attributes         */
54
/*    size                                  Pointer to size               */
55
/*    year                                  Pointer to year               */
56
/*    month                                 Pointer to month              */
57
/*    day                                   Pointer to day                */
58
/*    hour                                  Pointer to hour               */
59
/*    minute                                Pointer to minute             */
60
/*    second                                Pointer to second             */
61
/*                                                                        */
62
/*  OUTPUT                                                                */
63
/*                                                                        */
64
/*    return status                                                       */
65
/*                                                                        */
66
/*  CALLS                                                                 */
67
/*                                                                        */
68
/*    _fx_directory_information_get         Actual directory information  */
69
/*                                            get service                 */
70
/*                                                                        */
71
/*  CALLED BY                                                             */
72
/*                                                                        */
73
/*    Application Code                                                    */
74
/*                                                                        */
75
/*  RELEASE HISTORY                                                       */
76
/*                                                                        */
77
/*    DATE              NAME                      DESCRIPTION             */
78
/*                                                                        */
79
/*  05-19-2020     William E. Lamie         Initial Version 6.0           */
80
/*  09-30-2020     William E. Lamie         Modified comment(s),          */
81
/*                                            resulting in version 6.1    */
82
/*                                                                        */
83
/**************************************************************************/
84
1776
UINT  _fxe_directory_information_get(FX_MEDIA *media_ptr, CHAR *directory_name,
85
                                     UINT *attributes, ULONG *size,
86
                                     UINT *year, UINT *month, UINT *day,
87
                                     UINT *hour, UINT *minute, UINT *second)
88
{
89
90
UINT status;
91
92
93
    /* Check for a null media pointer or all null return parameter pointers.  */
94

1776
    if ((media_ptr == FX_NULL) ||
95


1091
        ((attributes == FX_NULL) && (size == FX_NULL) && (year == FX_NULL) && (month == FX_NULL) &&
96

547
         (day == FX_NULL) && (hour == FX_NULL) && (minute == FX_NULL) && (second == FX_NULL)))
97
    {
98
273
        return(FX_PTR_ERROR);
99
    }
100
101
    /* Check for a valid caller.  */
102

1503
    FX_CALLER_CHECKING_CODE
103
104
    /* Call actual directory information get service.  */
105
7
    status =  _fx_directory_information_get(media_ptr, directory_name, attributes, size,
106
                                            year, month, day, hour, minute, second);
107
108
    /* Directory information get is complete, return status.  */
109
7
    return(status);
110
}
111