RTEMS 6.1-rc6
Loading...
Searching...
No Matches
rtl-archive.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 * COPYRIGHT (c) 2018 Chris Johns <chrisj@rtems.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
48#if !defined (_RTEMS_RTL_ARCHIVE_H_)
49#define _RTEMS_RTL_ARCHIVE_H_
50
51#include <rtems.h>
52#include <rtems/chain.h>
53#include <rtems/printer.h>
54
55#ifdef __cplusplus
56extern "C" {
57#endif /* __cplusplus */
58
62#define RTEMS_RTL_ARCHIVE_USER_LOAD (1 << 0)
63#define RTEMS_RTL_ARCHIVE_REMOVE (1 << 1)
64#define RTEMS_RTL_ARCHIVE_LOAD (1 << 2)
70{
81
86{
87 size_t entry;
88 const char* label;
90
95{
96 void* base;
97 size_t size;
98 size_t entries;
99 const char* names;
102
106typedef struct rtems_rtl_archive
107{
109 const char* name;
110 size_t size;
111 time_t mtime;
112 off_t enames;
114 size_t refs;
115 uint32_t flags;
117
121typedef struct rtems_rtl_archives
122{
123 const char* config_name;
126 char* config;
129
133typedef void (*rtems_rtl_archive_error)(int num, const char* text);
134
142void rtems_rtl_archives_open (rtems_rtl_archives* archives, const char* config);
143
150
163
171bool rtems_rtl_archive_load (rtems_rtl_archives* archives, const char* name);
172
182 const char* symbol,
183 bool load);
184
205 size_t fsize,
206 const char** name,
207 off_t* offset,
208 size_t* size,
209 off_t* extended_names,
211
212#ifdef __cplusplus
213}
214#endif /* __cplusplus */
215
216#endif
This header file provides the Chains API.
User print interface to the bspIO print plug in.
This header file defines the RTEMS Classic API.
void rtems_rtl_archives_close(rtems_rtl_archives *archives)
Definition: rtl-archive.c:587
bool rtems_rtl_obj_archive_find_obj(int fd, size_t fsize, const char **name, off_t *offset, size_t *size, off_t *extended_names, rtems_rtl_archive_error error)
Definition: rtl-archive.c:1060
rtems_rtl_archive_search rtems_rtl_archive_obj_load(rtems_rtl_archives *archives, const char *symbol, bool load)
Definition: rtl-archive.c:933
rtems_rtl_archive_search
Definition: rtl-archive.h:70
@ rtems_rtl_archive_search_found
Definition: rtl-archive.h:73
@ rtems_rtl_archive_search_not_found
Definition: rtl-archive.h:71
@ rtems_rtl_archive_search_no_config
Definition: rtl-archive.h:78
@ rtems_rtl_archive_search_error
Definition: rtl-archive.h:76
@ rtems_rtl_archive_search_loaded
Definition: rtl-archive.h:74
bool rtems_rtl_archives_refresh(rtems_rtl_archives *archives)
Definition: rtl-archive.c:781
void(* rtems_rtl_archive_error)(int num, const char *text)
Definition: rtl-archive.h:133
bool rtems_rtl_archive_load(rtems_rtl_archives *archives, const char *name)
Definition: rtl-archive.c:904
void rtems_rtl_archives_open(rtems_rtl_archives *archives, const char *config)
Definition: rtl-archive.c:577
This structure represents a chain node.
Definition: chain.h:78
Definition: deflate.c:114
Definition: rtl-archive.h:86
size_t entry
Definition: rtl-archive.h:87
const char * label
Definition: rtl-archive.h:88
Definition: rtl-archive.h:95
rtems_rtl_archive_symbol * symbols
Definition: rtl-archive.h:100
size_t entries
Definition: rtl-archive.h:98
void * base
Definition: rtl-archive.h:96
const char * names
Definition: rtl-archive.h:99
size_t size
Definition: rtl-archive.h:97
Definition: rtl-archive.h:107
rtems_chain_node node
Definition: rtl-archive.h:108
time_t mtime
Definition: rtl-archive.h:111
rtems_rtl_archive_symbols symbols
Definition: rtl-archive.h:113
uint32_t flags
Definition: rtl-archive.h:115
const char * name
Definition: rtl-archive.h:109
size_t refs
Definition: rtl-archive.h:114
size_t size
Definition: rtl-archive.h:110
off_t enames
Definition: rtl-archive.h:112
Definition: rtl-archive.h:122
char * config
Definition: rtl-archive.h:126
size_t config_length
Definition: rtl-archive.h:125
time_t config_mtime
Definition: rtl-archive.h:124
const char * config_name
Definition: rtl-archive.h:123
rtems_chain_control archives
Definition: rtl-archive.h:127
This union represents a chain control block.
Definition: chain.h:96