aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-07-26 18:50:39 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-07-26 18:50:39 +0200
commit1c4d4f7e68ce1740b08b250292bab8361eca3402 (patch)
tree9d6c167df5d452d7287cf360df2fd9dd08e90576 /samsung-ipc
parent873093afb5e94d0e82524e0ad5f8689b2cee18cb (diff)
downloadexternal_libsamsung-ipc-1c4d4f7e68ce1740b08b250292bab8361eca3402.zip
external_libsamsung-ipc-1c4d4f7e68ce1740b08b250292bab8361eca3402.tar.gz
external_libsamsung-ipc-1c4d4f7e68ce1740b08b250292bab8361eca3402.tar.bz2
sec: RSIM access helper
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc')
-rw-r--r--samsung-ipc/sec.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/samsung-ipc/sec.c b/samsung-ipc/sec.c
index 6ea645d..be5dccf 100644
--- a/samsung-ipc/sec.c
+++ b/samsung-ipc/sec.c
@@ -120,6 +120,36 @@ int ipc_sec_change_locking_pw_setup(struct ipc_sec_change_locking_pw_data *data,
return 0;
}
+void *ipc_sec_rsim_access_setup(struct ipc_sec_rsim_access_request_header *header,
+ const void *sim_io_data, size_t sim_io_size)
+{
+ void *data;
+ size_t size;
+ unsigned char *p;
+
+ if (header == NULL)
+ return NULL;
+
+ if (sim_io_data == NULL)
+ sim_io_size = 0;
+
+ size = sizeof(struct ipc_sec_rsim_access_request_header) + sim_io_size;
+
+ data = calloc(1, size);
+
+ p = (unsigned char *) data;
+
+ memcpy(p, header, sizeof(struct ipc_sec_rsim_access_request_header));
+ p += sizeof(struct ipc_sec_rsim_access_request_header);
+
+ if (sim_io_data != NULL && sim_io_size > 0) {
+ memcpy(p, sim_io_data, sim_io_size);
+ p += sim_io_size;
+ }
+
+ return data;
+}
+
int ipc_sec_lock_infomation_setup(struct ipc_sec_lock_infomation_request_data *data,
unsigned char type)
{