From ede2b1c8b2f5659941ff7a0880e521ebbfbb69cc Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Sat, 16 Mar 2013 01:11:38 +0900 Subject: [PATCH] merge with master --- CMakeLists.txt | 8 ++++---- LICENSE | 0 packaging/capi-appfw-application.spec | 13 +++++-------- src/storage.c | 18 +++++++++--------- src/storage_internal.c | 4 ++-- 5 files changed, 20 insertions(+), 23 deletions(-) mode change 100755 => 100644 CMakeLists.txt mode change 100755 => 100644 LICENSE diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index 72efefe..143ac78 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,8 @@ FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") -SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC ") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Werror") IF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") @@ -42,7 +42,7 @@ SET_TARGET_PROPERTIES(${fw_name} CLEAN_DIRECT_OUTPUT 1 ) -INSTALL(TARGETS ${fw_name} DESTINATION lib) +INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) INSTALL( DIRECTORY ${INC_DIR}/ DESTINATION include/appfw FILES_MATCHING @@ -59,7 +59,7 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc @ONLY ) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) IF(UNIX) diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/packaging/capi-appfw-application.spec b/packaging/capi-appfw-application.spec index af8f33a..7fdfae4 100755 --- a/packaging/capi-appfw-application.spec +++ b/packaging/capi-appfw-application.spec @@ -1,10 +1,9 @@ -#sbs-git:slp/api/application capi-appfw-application 0.1.0 56d9b8e057f022f0e7fdb1853587158452e7ae1b Name: capi-appfw-application Summary: An Application library in SLP C API Version: 0.1.0 -Release: 49 -Group: TO_BE/FILLED_IN -License: TO BE FILLED IN +Release: 50 +Group: API +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(dlog) @@ -21,15 +20,13 @@ BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(sqlite3) -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig %description An Application library in SLP C API %package devel Summary: An Application library in SLP C API (Development) -Group: TO_BE/FILLED_IN +Group: API Requires: %{name} = %{version}-%{release} %description devel @@ -40,7 +37,7 @@ An Application library in SLP C API (DEV) %build MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} make %{?jobs:-j%jobs} diff --git a/src/storage.c b/src/storage.c index a6f9202..1a42a1e 100755 --- a/src/storage.c +++ b/src/storage.c @@ -11,7 +11,7 @@ * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ @@ -130,7 +130,7 @@ int storage_foreach_device_supported(storage_device_supported_cb callback, void } storage_id++; - + foreach_next = callback(storage_info->id, storage_info->device->type, storage_info->state, storage_info->device->path, user_data); if (foreach_next == false) @@ -161,7 +161,7 @@ int storage_get_root_directory(int storage, char **path) *path = strdup(storage_info->device->path); - return STORAGE_ERROR_NONE; + return STORAGE_ERROR_NONE; } @@ -211,7 +211,7 @@ int storage_get_state(int storage, storage_state_e *state) LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage); return STORAGE_ERROR_NOT_SUPPORTED; } - + storage_info->state = get_state(); *state = storage_info->state; @@ -262,7 +262,7 @@ int storage_set_state_changed_cb(int storage, storage_state_changed_cb callback, storage_info->state_cb = callback; storage_info->state_cb_data = user_data; - + set_state_cb = storage_info->device->set_state_cb; if (set_state_cb == NULL) @@ -328,7 +328,7 @@ int storage_get_total_space(int storage, unsigned long long *bytes) LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage); return STORAGE_ERROR_NOT_SUPPORTED; } - + if (get_space(bytes, NULL) != 0) { LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage); @@ -362,7 +362,7 @@ int storage_get_available_space(int storage, unsigned long long *bytes) LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage); return STORAGE_ERROR_NOT_SUPPORTED; } - + if (get_space(NULL, bytes) != 0) { LOGE("NOT_SUPPORTED(0x%08x) : storage(%d)", STORAGE_ERROR_NOT_SUPPORTED, storage); @@ -384,12 +384,12 @@ int storage_statfs(const char *directory, unsigned long long *total, unsigned lo if (total != NULL) { - *total = fs.f_bsize * fs.f_blocks; + *total = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks; } if (available != NULL) { - *available = fs.f_bsize * fs.f_bavail; + *available = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail; } return 0; diff --git a/src/storage_internal.c b/src/storage_internal.c index c9e0b6d..973fd54 100755 --- a/src/storage_internal.c +++ b/src/storage_internal.c @@ -11,7 +11,7 @@ * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ @@ -33,7 +33,7 @@ #define LOG_TAG "CAPI_APPFW_APPLICATION_STORAGE" -#define INTERNAL_MEMORY_PATH "/opt/media" +#define INTERNAL_MEMORY_PATH "/opt/usr/media" static int storage_internal_get_state() { -- 2.7.4