1 /* HDTEQ.C (c) Copyright Jan Jaeger, 2003-2009 */
2 /* Hercules Dynamic Loader */
3
4 #include "hstdinc.h"
5
6 #include "hercules.h"
7
8
9 typedef struct _DTEQ {
10 char *alias;
11 char *name;
12 } DTEQ;
13
14
15 static DTEQ dteq[] = {
16 /*
17 This table provides aliases for device types, such that various
18 device types may be mapped to a common loadable module.
19
20 The only purpose of this table is to associate the right loadable
21 module with a specific device type, before the device type in
22 question has been registered. This table will not be searched
23 for registered device types or if the specific loadable module exists.
24
25 device type requested
26 |
27 | base device support
28 | |
29 V V */
30
31 // { "3390", "3990" },
32 // { "3380", "3990" },
33
34 { "1052", "3270" },
35 { "3215", "3270" },
36 { "3287", "3270" },
37 { "SYSG", "3270" },
38
39 { "1052-C", "1052c" },
40 { "3215-C", "1052c" },
41
42 { "1442", "3505" },
43 { "2501", "3505" },
44
45 { "3211", "1403" },
46
47 { "3410", "3420" },
48 { "3411", "3420" },
49 // { "3420", "3420" },
50 { "3480", "3420" },
51 { "3490", "3420" },
52 { "3590", "3420" },
53 { "9347", "3420" },
54 { "9348", "3420" },
55 { "8809", "3420" },
56 { "3422", "3420" },
57 { "3430", "3420" },
58
59 { "LCS", "3088" },
60 { "CTCI", "3088" },
61 { "CTCT", "3088" },
62 { "CTCE", "3088" },
63 { "VMNET", "3088" },
64
65 { "HCHAN", "2880" },
66 // { "2880", "2880" },
67 { "2870", "2880" },
68 { "2860", "2880" },
69 { "9032", "2880" },
70
71 { NULL, NULL } };
72
73
74 #if defined(OPTION_DYNAMIC_LOAD)
hdt_device_type_equates(char * typname)75 static char *hdt_device_type_equates(char *typname)
76 {
77 DTEQ *device_type;
78 char *(*nextcall)(char *);
79
80 for(device_type = dteq; device_type->name; device_type++)
81 if(!strcasecmp(device_type->alias, typname))
82 return device_type->name;
83
84 if((nextcall = HDL_FINDNXT(hdt_device_type_equates)))
85 return nextcall(typname);
86
87 return NULL;
88 }
89
90 /* Libtool static name colision resolution */
91 /* note : lt_dlopen will look for symbol & modulename_LTX_symbol */
92 /* for use in DLREOPEN case only */
93 #if !defined(HDL_BUILD_SHARED) && defined(HDL_USE_LIBTOOL)
94 #define hdl_ddev hdteq_LTX_hdl_ddev
95 #define hdl_depc hdteq_LTX_hdl_depc
96 #define hdl_reso hdteq_LTX_hdl_reso
97 #define hdl_init hdteq_LTX_hdl_init
98 #define hdl_fini hdteq_LTX_hdl_fini
99 #endif
100
101
102 HDL_DEPENDENCY_SECTION;
103 {
104 HDL_DEPENDENCY(HERCULES);
105 }
106 END_DEPENDENCY_SECTION
107
108
109 HDL_REGISTER_SECTION;
110 {
111 HDL_REGISTER(hdl_device_type_equates,hdt_device_type_equates);
112 }
113 END_REGISTER_SECTION
114 #endif
115