From bfb20b0c1fb891360524f02eed79c8dbe7278626 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sat, 26 Jul 2014 15:53:11 +0200 Subject: utils: Shared libraries don't allow for internal functions Signed-off-by: Paul Kocialkowski --- include/samsung-ipc.h | 13 +++++++++ samsung-ipc/Makefile.am | 1 - samsung-ipc/devices/aries/aries.c | 1 - samsung-ipc/devices/crespo/crespo.c | 1 - samsung-ipc/devices/maguro/maguro.c | 1 - samsung-ipc/devices/xmm616/xmm616.c | 1 - samsung-ipc/devices/xmm626/xmm626_hsic.c | 1 - samsung-ipc/devices/xmm626/xmm626_mipi.c | 1 - samsung-ipc/devices/xmm626/xmm626_sec_modem.c | 1 - samsung-ipc/rfs.c | 1 - samsung-ipc/sms.c | 1 - samsung-ipc/utils.c | 1 - samsung-ipc/utils.h | 39 --------------------------- 13 files changed, 13 insertions(+), 50 deletions(-) delete mode 100644 samsung-ipc/utils.h diff --git a/include/samsung-ipc.h b/include/samsung-ipc.h index e5f24d1..5be2ac9 100644 --- a/include/samsung-ipc.h +++ b/include/samsung-ipc.h @@ -129,6 +129,19 @@ int ipc_rfs_header_setup(struct ipc_rfs_header *header, int ipc_rfs_message_setup(const struct ipc_rfs_header *header, struct ipc_message *message); +void *file_data_read(const char *path, size_t size, size_t chunk_size, + size_t offset); +int file_data_write(const char *path, const void *data, size_t size, + size_t chunk_size, size_t offset); +int network_iface_up(const char *iface, int domain, int type); +int network_iface_down(const char *iface, int domain, int type); +int sysfs_value_read(const char *path); +int sysfs_value_write(const char *path, int value); +char *sysfs_string_read(const char *path, size_t length); +int sysfs_string_write(const char *path, const char *buffer, size_t length); +char *data2string(const void *data, size_t size); +void *string2data(const char *string, size_t *size_p); + /* * Samsung-IPC protocol */ diff --git a/samsung-ipc/Makefile.am b/samsung-ipc/Makefile.am index 766796e..a82eecf 100644 --- a/samsung-ipc/Makefile.am +++ b/samsung-ipc/Makefile.am @@ -53,7 +53,6 @@ libsamsung_ipc_la_SOURCES = \ devices/n7100/n7100.c \ devices/n7100/n7100.h \ utils.c \ - utils.h \ call.c \ sms.c \ sec.c \ diff --git a/samsung-ipc/devices/aries/aries.c b/samsung-ipc/devices/aries/aries.c index 012d01d..de010c9 100644 --- a/samsung-ipc/devices/aries/aries.c +++ b/samsung-ipc/devices/aries/aries.c @@ -32,7 +32,6 @@ #include #include -#include #include "onedram.h" #include "phonet.h" diff --git a/samsung-ipc/devices/crespo/crespo.c b/samsung-ipc/devices/crespo/crespo.c index 23658c1..7589137 100644 --- a/samsung-ipc/devices/crespo/crespo.c +++ b/samsung-ipc/devices/crespo/crespo.c @@ -29,7 +29,6 @@ #include #include -#include #include "crespo_modem_ctl.h" diff --git a/samsung-ipc/devices/maguro/maguro.c b/samsung-ipc/devices/maguro/maguro.c index 7bb59af..aee8f75 100644 --- a/samsung-ipc/devices/maguro/maguro.c +++ b/samsung-ipc/devices/maguro/maguro.c @@ -26,7 +26,6 @@ #include #include -#include #include "xmm626.h" #include "xmm626_mipi.h" diff --git a/samsung-ipc/devices/xmm616/xmm616.c b/samsung-ipc/devices/xmm616/xmm616.c index 3e7c614..67aad8d 100644 --- a/samsung-ipc/devices/xmm616/xmm616.c +++ b/samsung-ipc/devices/xmm616/xmm616.c @@ -25,7 +25,6 @@ #include #include -#include #include "xmm616.h" diff --git a/samsung-ipc/devices/xmm626/xmm626_hsic.c b/samsung-ipc/devices/xmm626/xmm626_hsic.c index 07154bd..30ade46 100644 --- a/samsung-ipc/devices/xmm626/xmm626_hsic.c +++ b/samsung-ipc/devices/xmm626/xmm626_hsic.c @@ -28,7 +28,6 @@ #include #include -#include #include "xmm626.h" #include "xmm626_hsic.h" diff --git a/samsung-ipc/devices/xmm626/xmm626_mipi.c b/samsung-ipc/devices/xmm626/xmm626_mipi.c index 667a4ea..813e8d7 100644 --- a/samsung-ipc/devices/xmm626/xmm626_mipi.c +++ b/samsung-ipc/devices/xmm626/xmm626_mipi.c @@ -28,7 +28,6 @@ #include #include -#include #include "xmm626.h" #include "xmm626_mipi.h" diff --git a/samsung-ipc/devices/xmm626/xmm626_sec_modem.c b/samsung-ipc/devices/xmm626/xmm626_sec_modem.c index 100ef5f..5f4d7bf 100644 --- a/samsung-ipc/devices/xmm626/xmm626_sec_modem.c +++ b/samsung-ipc/devices/xmm626/xmm626_sec_modem.c @@ -28,7 +28,6 @@ #include #include -#include #include "modem.h" #include "modem_prj.h" diff --git a/samsung-ipc/rfs.c b/samsung-ipc/rfs.c index 96d8bf0..5950f30 100644 --- a/samsung-ipc/rfs.c +++ b/samsung-ipc/rfs.c @@ -31,7 +31,6 @@ #include #include -#include char *ipc_nv_data_md5_calculate(const char *path, const char *secret, size_t size, size_t chunk_size) diff --git a/samsung-ipc/sms.c b/samsung-ipc/sms.c index ace6390..e06890f 100644 --- a/samsung-ipc/sms.c +++ b/samsung-ipc/sms.c @@ -22,7 +22,6 @@ #include #include -#include void *ipc_sms_send_msg_setup(struct ipc_sms_send_msg_request_header *header, const void *smsc, size_t smsc_size, const void *pdu, size_t pdu_size) diff --git a/samsung-ipc/utils.c b/samsung-ipc/utils.c index ed2e6e6..d6481c2 100644 --- a/samsung-ipc/utils.c +++ b/samsung-ipc/utils.c @@ -31,7 +31,6 @@ #include #include -#include void *file_data_read(const char *path, size_t size, size_t chunk_size, size_t offset) diff --git a/samsung-ipc/utils.h b/samsung-ipc/utils.h deleted file mode 100644 index 4e52ca6..0000000 --- a/samsung-ipc/utils.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of libsamsung-ipc. - * - * Copyright (C) 2013-2014 Paul Kocialkowski - * - * libsamsung-ipc is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * libsamsung-ipc is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsamsung-ipc. If not, see . - * - */ - -#ifndef __UTIL_H__ -#define __UTIL_H__ - -void *file_data_read(const char *path, size_t size, size_t chunk_size, - size_t offset); -int file_data_write(const char *path, const void *data, size_t size, - size_t chunk_size, size_t offset); -int network_iface_up(const char *iface, int domain, int type); -int network_iface_down(const char *iface, int domain, int type); -int sysfs_value_read(const char *path); -int sysfs_value_write(const char *path, int value); -char *sysfs_string_read(const char *path, size_t length); -int sysfs_string_write(const char *path, const char *buffer, size_t length); -char *data2string(const void *data, size_t size); -void *string2data(const char *string, size_t *size_p); - -#endif - -// vim:ts=4:sw=4:expandtab -- cgit v1.1