From 1b0e45e5c4bbaa6154b22fac6706f28d2ca9c305 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 3 Jul 2014 13:14:40 +0200 Subject: sec: Proper prefixes and unused function removal Signed-off-by: Paul Kocialkowski --- include/sec.h | 5 ++--- samsung-ipc/sec.c | 17 ----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/include/sec.h b/include/sec.h index c35ed69..236bc37 100644 --- a/include/sec.h +++ b/include/sec.h @@ -127,7 +127,7 @@ struct ipc_sec_change_locking_pw_data { unsigned char password_new[39]; } __attribute__((__packed__)); -struct ipc_sec_rsim_access_request_data { +struct ipc_sec_rsim_access_request_header { unsigned char command; // IPC_SEC_RSIM_COMMAND unsigned short file_id; unsigned char p1, p2, p3; @@ -146,7 +146,7 @@ struct ipc_sec_rsim_access_usim_response_header { unsigned char length; } __attribute__((__packed__)); -struct ipc_sec_sim_icc_type { +struct ipc_sec_sim_icc_type_data { unsigned char type; // IPC_SEC_SIM_CARD_TYPE } __attribute__((__packed__)); @@ -173,7 +173,6 @@ int ipc_sec_phone_lock_request_set_setup(struct ipc_sec_phone_lock_request_set_d int ipc_sec_change_locking_pw_setup(struct ipc_sec_change_locking_pw_data *data, unsigned char facility_type, const char *password_old, const char *password_new); -void *ipc_sec_rsim_access_file_data_extract(const void *data, size_t size); int ipc_sec_lock_infomation_setup(struct ipc_sec_lock_infomation_request_data *data, unsigned char type); diff --git a/samsung-ipc/sec.c b/samsung-ipc/sec.c index ace155b..1570836 100644 --- a/samsung-ipc/sec.c +++ b/samsung-ipc/sec.c @@ -119,23 +119,6 @@ int ipc_sec_change_locking_pw_setup(struct ipc_sec_change_locking_pw_data *data, return 0; } -void *ipc_sec_rsim_access_file_data_extract(const void *data, size_t size) -{ - struct ipc_sec_rsim_access_response_header *header; - void *file_data; - - if (data == NULL || size < sizeof(struct ipc_sec_rsim_access_response_header)) - return NULL; - - header = (struct ipc_sec_rsim_access_response_header *) data; - - file_data = calloc(1, header->length); - - memcpy(file_data, (void *) ((unsigned char *) data + sizeof(struct ipc_sec_rsim_access_response_header)), header->length); - - return file_data; -} - int ipc_sec_lock_infomation_setup(struct ipc_sec_lock_infomation_request_data *data, unsigned char type) { -- cgit v1.1