1 From f03c7987c234a81f7e4274b26bab07318357a2a5 Mon Sep 17 00:00:00 2001
2 From: Sergio Prado <sergio.prado@e-labworks.com>
3 Date: Fri, 25 Dec 2015 20:09:21 -0200
4 Subject: [PATCH] Remove inline for read_data and write_data
6 read_data and write_data functions are declared with inline, but
7 their definition is not in a .h file. This is causing errors when
10 tcsps.c:(.text+0x4ac): undefined reference to `read_data'
11 tcsps.c:(.text+0x1888): undefined reference to `write_data'
14 Partial backport of upstream commit
15 3297fcdf5ac0df868778e976b8b59e35542c1ee2.
17 Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
19 src/include/tcsps.h | 5 -----
20 src/tcs/ps/ps_utils.c | 8 --------
21 src/tspi/ps/ps_utils.c | 4 ++--
22 3 files changed, 2 insertions(+), 15 deletions(-)
24 diff --git a/src/include/tcsps.h b/src/include/tcsps.h
25 index 87542965877d..dcd5db469822 100644
26 --- a/src/include/tcsps.h
27 +++ b/src/include/tcsps.h
28 @@ -23,13 +23,8 @@ int get_file();
33 TSS_RESULT read_data(int, void *, UINT32);
34 TSS_RESULT write_data(int, void *, UINT32);
36 -inline TSS_RESULT read_data(int, void *, UINT32);
37 -inline TSS_RESULT write_data(int, void *, UINT32);
39 int write_key_init(int, UINT32, UINT32, UINT32);
40 TSS_RESULT cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32);
41 TSS_RESULT UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *);
42 diff --git a/src/tcs/ps/ps_utils.c b/src/tcs/ps/ps_utils.c
43 index 2e7f502b9599..35ac89f8fc12 100644
44 --- a/src/tcs/ps/ps_utils.c
45 +++ b/src/tcs/ps/ps_utils.c
47 struct key_disk_cache *key_disk_cache_head = NULL;
55 read_data(int fd, void *data, UINT32 size)
58 @@ -64,11 +60,7 @@ read_data(int fd, void *data, UINT32 size)
67 write_data(int fd, void *data, UINT32 size)
70 diff --git a/src/tspi/ps/ps_utils.c b/src/tspi/ps/ps_utils.c
71 index aac40a147314..83259141d375 100644
72 --- a/src/tspi/ps/ps_utils.c
73 +++ b/src/tspi/ps/ps_utils.c
80 read_data(int fd, void *data, UINT32 size)
83 @@ -39,7 +39,7 @@ read_data(int fd, void *data, UINT32 size)
89 write_data(int fd, void *data, UINT32 size)