1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
From 034e9cd7e539e1feda2fbe9a3646e28156856594 Mon Sep 17 00:00:00 2001
From: Lans Zhang <jia.zhang@windriver.com>
Date: Thu, 15 Jun 2017 10:21:02 +0800
Subject: [PATCH] Fix build failure when searching tabrmd.h
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
---
Makefile.am | 2 +-
src/access-broker.c | 2 +-
src/include/tabrmd.h | 56 ---------------------------
src/include/tcti-tabrmd.h | 2 +-
src/include/tss2/tabrmd.h | 56 +++++++++++++++++++++++++++
src/resource-manager.c | 2 +-
src/tabrmd-error.c | 2 +-
src/tabrmd.c | 2 +-
src/tcti-tabrmd.c | 2 +-
test/integration/hash-sequence.int.c | 2 +-
test/integration/password-authorization.int.c | 2 +-
test/integration/tcti-cancel.int.c | 2 +-
test/integration/tcti-set-locality.int.c | 2 +-
13 files changed, 67 insertions(+), 67 deletions(-)
delete mode 100644 src/include/tabrmd.h
create mode 100644 src/include/tss2/tabrmd.h
diff --git a/Makefile.am b/Makefile.am
index 5f88429..4733d4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -90,7 +90,7 @@ install-data-hook:
$(DESTDIR)$(mandir)/man3/tss2_tcti_tabrmd_init_full.3
tpm2_abrmddir = $(includedir)/tss2
-tpm2_abrmd_HEADERS = $(srcdir)/src/include/tabrmd.h
+tpm2_abrmd_HEADERS = $(srcdir)/src/include/tss2/tabrmd.h
libtcti_tabrmddir = $(includedir)/tcti
libtcti_tabrmd_HEADERS = $(srcdir)/src/include/tcti-tabrmd.h
diff --git a/src/access-broker.c b/src/access-broker.c
index d21113d..f357101 100644
--- a/src/access-broker.c
+++ b/src/access-broker.c
@@ -28,7 +28,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "access-broker.h"
#include "tcti.h"
diff --git a/src/include/tabrmd.h b/src/include/tabrmd.h
deleted file mode 100644
index 42d41a2..0000000
--- a/src/include/tabrmd.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2017, Intel Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef TSS2_TABD_H
-#define TSS2_TABD_H
-
-#include <gio/gio.h>
-#include <tpm20.h>
-
-#define TABRMD_DBUS_INTERFACE "com.intel.tss2.TctiTabrmd"
-#define TABRMD_DBUS_NAME_DEFAULT "com.intel.tss2.Tabrmd"
-#define TABRMD_DBUS_PATH "/com/intel/tss2/Tabrmd/Tcti"
-#define TABRMD_DBUS_METHOD_CREATE_CONNECTION "CreateConnection"
-#define TABRMD_DBUS_METHOD_CANCEL "Cancel"
-#define TABRMD_DBUS_TYPE_DEFAULT G_BUS_TYPE_SYSTEM
-
-/* implementation specific RCs */
-#define TSS2_RESMGR_RC_INTERNAL_ERROR (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | (1 << TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT))
-#define TSS2_RESMGR_RC_SAPI_INIT (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | (2 << TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT))
-#define TSS2_RESMGR_RC_OUT_OF_MEMORY (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | (3 << TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT))
-/* RCs in the RESMGR layer */
-#define TSS2_RESMGR_RC_BAD_VALUE (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_BAD_VALUE)
-#define TSS2_RESMGR_RC_NOT_PERMITTED (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_NOT_PERMITTED)
-#define TSS2_RESMGR_RC_NOT_IMPLEMENTED (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_NOT_IMPLEMENTED)
-#define TSS2_RESMGR_RC_GENERAL_FAILURE (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_GENERAL_FAILURE)
-#define TSS2_RESMGR_RC_OBJECT_MEMORY (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TPM_RC_OBJECT_MEMORY)
-
-#define TABRMD_ERROR tabrmd_error_quark ()
-GQuark tabrmd_error_quark (void);
-
-TSS2_RC tss2_tcti_tabrmd_dump_trans_state (TSS2_TCTI_CONTEXT *tcti_context);
-
-#endif /* TSS2_TABD_H */
diff --git a/src/include/tcti-tabrmd.h b/src/include/tcti-tabrmd.h
index c145eb5..e8e0c7f 100644
--- a/src/include/tcti-tabrmd.h
+++ b/src/include/tcti-tabrmd.h
@@ -35,7 +35,7 @@ extern "C" {
#include <sapi/tpm20.h>
#include <sapi/tss2_tcti.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#define TCTI_TABRMD_DBUS_TYPE_DEFAULT TABRMD_DBUS_TYPE_DEFAULT
#define TCTI_TABRMD_DBUS_NAME_DEFAULT TABRMD_DBUS_NAME_DEFAULT
diff --git a/src/include/tss2/tabrmd.h b/src/include/tss2/tabrmd.h
new file mode 100644
index 0000000..42d41a2
--- /dev/null
+++ b/src/include/tss2/tabrmd.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2017, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef TSS2_TABD_H
+#define TSS2_TABD_H
+
+#include <gio/gio.h>
+#include <tpm20.h>
+
+#define TABRMD_DBUS_INTERFACE "com.intel.tss2.TctiTabrmd"
+#define TABRMD_DBUS_NAME_DEFAULT "com.intel.tss2.Tabrmd"
+#define TABRMD_DBUS_PATH "/com/intel/tss2/Tabrmd/Tcti"
+#define TABRMD_DBUS_METHOD_CREATE_CONNECTION "CreateConnection"
+#define TABRMD_DBUS_METHOD_CANCEL "Cancel"
+#define TABRMD_DBUS_TYPE_DEFAULT G_BUS_TYPE_SYSTEM
+
+/* implementation specific RCs */
+#define TSS2_RESMGR_RC_INTERNAL_ERROR (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | (1 << TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT))
+#define TSS2_RESMGR_RC_SAPI_INIT (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | (2 << TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT))
+#define TSS2_RESMGR_RC_OUT_OF_MEMORY (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | (3 << TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT))
+/* RCs in the RESMGR layer */
+#define TSS2_RESMGR_RC_BAD_VALUE (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_BAD_VALUE)
+#define TSS2_RESMGR_RC_NOT_PERMITTED (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_NOT_PERMITTED)
+#define TSS2_RESMGR_RC_NOT_IMPLEMENTED (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_NOT_IMPLEMENTED)
+#define TSS2_RESMGR_RC_GENERAL_FAILURE (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TSS2_BASE_RC_GENERAL_FAILURE)
+#define TSS2_RESMGR_RC_OBJECT_MEMORY (TSS2_RC)(TSS2_RESMGR_ERROR_LEVEL | TPM_RC_OBJECT_MEMORY)
+
+#define TABRMD_ERROR tabrmd_error_quark ()
+GQuark tabrmd_error_quark (void);
+
+TSS2_RC tss2_tcti_tabrmd_dump_trans_state (TSS2_TCTI_CONTEXT *tcti_context);
+
+#endif /* TSS2_TABD_H */
diff --git a/src/resource-manager.c b/src/resource-manager.c
index 6efdd82..8ad4e46 100644
--- a/src/resource-manager.c
+++ b/src/resource-manager.c
@@ -35,7 +35,7 @@
#include "resource-manager.h"
#include "sink-interface.h"
#include "source-interface.h"
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "tpm2-header.h"
#include "tpm2-command.h"
#include "tpm2-response.h"
diff --git a/src/tabrmd-error.c b/src/tabrmd-error.c
index 5ff5a7d..41a561d 100644
--- a/src/tabrmd-error.c
+++ b/src/tabrmd-error.c
@@ -1,6 +1,6 @@
#include <gio/gio.h>
#include <glib.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
static const GDBusErrorEntry tabrmd_error_entries[] = {
{
diff --git a/src/tabrmd.c b/src/tabrmd.c
index 2275aa5..7156cdf 100644
--- a/src/tabrmd.c
+++ b/src/tabrmd.c
@@ -34,7 +34,7 @@
#include <unistd.h>
#include <sapi/tpm20.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "access-broker.h"
#include "connection.h"
#include "connection-manager.h"
diff --git a/src/tcti-tabrmd.c b/src/tcti-tabrmd.c
index d6d78ea..52418de 100644
--- a/src/tcti-tabrmd.c
+++ b/src/tcti-tabrmd.c
@@ -35,7 +35,7 @@
#include <sapi/tpm20.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "tcti-tabrmd.h"
#include "tcti-tabrmd-priv.h"
#include "tpm2-header.h"
diff --git a/test/integration/hash-sequence.int.c b/test/integration/hash-sequence.int.c
index cf8331d..fd489f9 100644
--- a/test/integration/hash-sequence.int.c
+++ b/test/integration/hash-sequence.int.c
@@ -34,7 +34,7 @@
#include <sapi/tpm20.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "tcti-tabrmd.h"
#include "common.h"
diff --git a/test/integration/password-authorization.int.c b/test/integration/password-authorization.int.c
index e6298ef..5416eaa 100644
--- a/test/integration/password-authorization.int.c
+++ b/test/integration/password-authorization.int.c
@@ -32,7 +32,7 @@
#include <glib.h>
#include <inttypes.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "tcti-tabrmd.h"
#include "common.h"
diff --git a/test/integration/tcti-cancel.int.c b/test/integration/tcti-cancel.int.c
index 31f0f9a..c2a808b 100644
--- a/test/integration/tcti-cancel.int.c
+++ b/test/integration/tcti-cancel.int.c
@@ -27,7 +27,7 @@
#include <glib.h>
#include <inttypes.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "tcti-tabrmd.h"
#include "common.h"
diff --git a/test/integration/tcti-set-locality.int.c b/test/integration/tcti-set-locality.int.c
index 6b7509b..0a54b6a 100644
--- a/test/integration/tcti-set-locality.int.c
+++ b/test/integration/tcti-set-locality.int.c
@@ -27,7 +27,7 @@
#include <glib.h>
#include <inttypes.h>
-#include "tabrmd.h"
+#include <tss2/tabrmd.h>
#include "tcti-tabrmd.h"
#include "common.h"
--
2.7.5
|