GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: fx_file_seek.c Lines: 2 2 100.0 %
Date: 2024-01-10 21:53:23 Branches: 0 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
/**   File                                                                */
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_file.h"
30
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _fx_file_seek                                       PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    William E. Lamie, Microsoft Corporation                             */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function positions the internal file pointers to the specified */
45
/*    byte offset such that the next read or write operation will be      */
46
/*    performed there.  If the byte offset is greater than the size, the  */
47
/*    file pointers will be positioned to the end of the file.            */
48
/*                                                                        */
49
/*  INPUT                                                                 */
50
/*                                                                        */
51
/*    file_ptr                              File control block pointer    */
52
/*    byte_offset                           Byte offset into the file     */
53
/*                                                                        */
54
/*  OUTPUT                                                                */
55
/*                                                                        */
56
/*    return status                                                       */
57
/*                                                                        */
58
/*  CALLS                                                                 */
59
/*                                                                        */
60
/*    _fx_file_extended_seek                Seek to specified position    */
61
/*                                                                        */
62
/*  CALLED BY                                                             */
63
/*                                                                        */
64
/*    Application Code                                                    */
65
/*                                                                        */
66
/*  RELEASE HISTORY                                                       */
67
/*                                                                        */
68
/*    DATE              NAME                      DESCRIPTION             */
69
/*                                                                        */
70
/*  05-19-2020     William E. Lamie         Initial Version 6.0           */
71
/*  09-30-2020     William E. Lamie         Modified comment(s), and      */
72
/*                                            Added conditional to        */
73
/*                                            disable one line function,  */
74
/*                                            resulting in version 6.1    */
75
/*                                                                        */
76
/**************************************************************************/
77
#ifndef FX_DISABLE_ONE_LINE_FUNCTION
78
65
UINT  _fx_file_seek(FX_FILE *file_ptr, ULONG byte_offset)
79
{
80
81
65
    return(_fx_file_extended_seek(file_ptr, (ULONG64) byte_offset));
82
}
83
#endif /* FX_DISABLE_ONE_LINE_FUNCTION */