sec: Proper prefixes and unused function removal
authorPaul Kocialkowski <contact@paulk.fr>
Thu, 3 Jul 2014 11:14:40 +0000 (13:14 +0200)
committerPaul Kocialkowski <contact@paulk.fr>
Thu, 3 Jul 2014 11:14:40 +0000 (13:14 +0200)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
include/sec.h
samsung-ipc/sec.c

index c35ed69..236bc37 100644 (file)
@@ -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);
 
index ace155b..1570836 100644 (file)
@@ -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)
 {