source: rtems-libbsd/freebsd-userspace/rtems/generate_kvm_symbols @ 34e1fb2

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 34e1fb2 was 34e1fb2, checked in by Joel Sherrill <joel.sherrill@…>, on 10/24/12 at 20:38:22

Add support for kvm.h in RTEMS terms

The implementation uses an array of strings and variable names. The
names are weak symbolic references to the items we have seen calls
to kvm services with.

  • Property mode set to 100755
File size: 1.5 KB
Line 
1#! /bin/sh
2#
3# This file generates the symbol table for the kvm subsystem. The
4# table is limited to the ones we believe are needed.
5
6symbols=""
7while read sym
8do
9  symbols="${symbols} ${sym}"
10done <<EOF
11_ifnet
12_rtstat
13_rt_tables
14_mrtstat
15_mfchashtbl
16_viftable
17_ipxpcb_list
18_ipxstat
19_spx_istat
20_ddpstat
21_ddpcb
22_ngsocklist
23_ip6stat
24_icmp6stat
25_ipsec4stat
26_ipsec6stat
27_pim6stat
28_mrt6stat
29_mf6ctable
30_mif6table
31_pfkeystat
32_mbstat
33_mbtypes
34_nmbclusters
35_nmbufs
36_mbuf_hiwm
37_clust_hiwm
38_smp_cpus
39_pagesize
40_mb_statpcpu
41_rttrash
42_mbuf_lowm
43_clust_lowm
44_carpstats
45_pfsyncstats
46_ahstat
47_espstat
48_ipcompstat
49_tcpstat
50_udpstat
51_ipstat
52_icmpstat
53_igmpstat
54_pimstat
55_tcbinfo
56_udbinfo
57_divcbinfo
58_ripcbinfo
59_unp_count
60_unp_gencnt
61_unp_dhead
62_unp_shead
63_rip6stat
64_sctpstat
65_mfctablesize
66_arpstat
67EOF
68
69cat <<EOF
70/**** THIS FILE IS GENERATED BY A SCRIPT ****/
71
72/*
73 * This file contains the known list of symbols for the kvm subsystem.
74 */
75
76#include "kvm_private.h"
77#include "stdio.h"
78
79/*
80 *  The following is the known list of symbols that may be passed
81 *  to the kvm family of calls.
82 */
83
84EOF
85for sym in ${symbols}
86do
87  no_underscore=`echo $sym | sed -e 's/^_//' `
88  echo "extern int ${no_underscore} __attribute((weak));"
89done
90
91cat <<EOF
92/*
93 *  The following is the known list of symbols that may be passed
94 *  to the kvm family of calls.
95 */
96
97kvm_symval_t rtems_kvm_symbols[] = {
98EOF
99for sym in ${symbols}
100do
101  no_underscore=`echo $sym | sed -e 's/^_//' `
102  echo "  { \"${sym}\", &${no_underscore} },"
103done
104
105cat <<EOF
106  { "", NULL }
107};
108EOF
Note: See TracBrowser for help on using the repository browser.