storage: Change wrong name ingroup 52/315852/1 accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen accepted/tizen/unified/20240809.055154 accepted/tizen/unified/dev/20240812.222957 accepted/tizen/unified/toolchain/20240813.045213 accepted/tizen/unified/x/20240812.041945 accepted/tizen/unified/x/asan/20240813.231502
authorUnsung Lee <unsung.lee@samsung.com>
Thu, 8 Aug 2024 07:16:54 +0000 (16:16 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 8 Aug 2024 07:16:58 +0000 (16:16 +0900)
Change wrong name "FRAMEWORK/SYSTEM" to "CAPI_SYSTEM_STORAGE_MODULE"
in the comment. "FRAMEWORK/SYSTEM" is non-existing group.

Change-Id: I991720b60ab32edc66582b3fdc206f0cf7b88168
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
doc/storage_doc.h
include/storage-expand.h
include/storage.h
src/statvfs.c

index f45144a..15b19d4 100755 (executable)
@@ -46,7 +46,7 @@
  * - Others
  * - System ringtones
  *
- * @section CAPI_SYSTEM_STORAGE_MODULE_OVERVIEW Related Features
+ * @section CAPI_SYSTEM_STORAGE_MODULE_FEATURE Related Features
  * This API is related with the following features:\n
  * - %http://tizen.org/feature/storage.external\n
  *
index dbc24c3..698e360 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
 
 /**
  * @brief Enumeration for Storage of error codes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  */
 typedef enum {
        STORAGE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
@@ -47,7 +47,7 @@ typedef enum {
 
 /**
  * @brief Enumeration for the storage types.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  */
 typedef enum {
        STORAGE_TYPE_INTERNAL,          /**< Internal device storage (built-in storage in a device, non-removable) */
@@ -58,7 +58,7 @@ typedef enum {
 
 /**
  * @brief Enumeration for storage devices state.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  */
 typedef enum {
        STORAGE_STATE_UNMOUNTABLE = -2, /**< Storage is present but cannot be mounted. Typically it happens if the file system of the storage is corrupted */
@@ -70,7 +70,7 @@ typedef enum {
 
 /**
  * @brief Called to get information once for each supported storage.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The unique storage ID
  * @param[in] type The type of the storage
  * @param[in] state The current state of the storage
@@ -89,7 +89,7 @@ typedef bool (*storage_device_supported_cb)(int storage_id, storage_type_e type,
  * @brief Retrieves all the storage in a device.
  * @details This function invokes the callback function once for each storage in a device. \n
  *          If storage_device_supported_cb() returns @c false, then the iteration will be finished.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] callback The iteration callback function
  * @param[in] user_data The user data to be passed to the callback function
  * @return @c 0 on success,
@@ -104,7 +104,7 @@ int storage_foreach_device_supported(storage_device_supported_cb callback, void
 
 /**
  * @brief Gets the absolute path to the root directory of the given storage.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @remarks Files saved on the internal/external storage are readable or writable by all applications.\n
  *          When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n
  *          If you want to access files or directories in internal storage, you must declare %http://tizen.org/privilege/mediastorage.\n
@@ -127,7 +127,7 @@ int storage_get_root_directory(int storage_id, char **path);
 
 /**
  * @brief Enumeration for the storage directory types.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  */
 typedef enum {
        STORAGE_DIRECTORY_IMAGES, /**< Image directory */
@@ -145,7 +145,7 @@ typedef enum {
 
 /**
  * @brief Gets the absolute path to the each directory of the given storage.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @remarks Files saved on the internal/external storage are readable or writable by all applications.\n
  *          When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n
  *          The directory path may not exist, so you must make sure that it exists before using it.\n
@@ -170,7 +170,7 @@ int storage_get_directory(int storage_id, storage_directory_e type, char **path)
 
 /**
  * @brief Gets the type of the given storage.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The storage device
  * @param[out] type The type of the storage
  * @return @c 0 on success,
@@ -186,7 +186,7 @@ int storage_get_type(int storage_id, storage_type_e *type);
 
 /**
  * @brief Gets the current state of the given storage.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The storage device
  * @param[out] state The current state of the storage
  * @return @c 0 on success,
@@ -205,7 +205,7 @@ int storage_get_state(int storage_id, storage_state_e *state);
 
 /**
  * @brief Called when the state of storage changes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The unique storage ID
  * @param[in] state The current state of the storage
  * @param[in] user_data The user data passed from the foreach function
@@ -218,7 +218,7 @@ typedef void (*storage_state_changed_cb)(int storage_id, storage_state_e state,
 
 /**
  * @brief Registers a callback function to be invoked when the state of the storage changes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The storage device
  * @param[in] callback The callback function to register
  * @param[in] user_data The user data to be passed to the callback function
@@ -237,7 +237,7 @@ int storage_set_state_changed_cb(int storage_id, storage_state_changed_cb callba
 
 /**
  * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The storage device to monitor
  * @param[in] callback The callback function to register
  * @return @c 0 on success,
@@ -323,7 +323,7 @@ int storage_unset_changed_cb(storage_type_e type, storage_changed_cb callback);
 
 /**
  * @brief Gets the total space of the given storage in bytes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The storage device
  * @param[out] bytes The total space size of the storage (bytes)
  * @return @c 0 on success,
@@ -341,7 +341,7 @@ int storage_get_total_space(int storage_id, unsigned long long *bytes);
 
 /**
  * @brief Gets the available space size of the given storage in bytes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[in] storage_id The storage device
  * @param[out] bytes The available space size of the storage (bytes)
  * @return @c 0 on success,
index 992497e..d826ae8 100644 (file)
@@ -26,7 +26,7 @@ extern "C" {
 
 /**
  * @file storage.h
- * @ingroup FRAMEWORK/SYSTEM
+ * @ingroup CAPI_SYSTEM_STORAGE_MODULE
  * @brief This file contains the API for the status of devices.
  * @author TIZEN
  * @date 2013-02-15
@@ -46,7 +46,7 @@ extern "C" {
 
 /**
  * @brief Gets the internal memory size.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[out] buf A pointer to a statvfs structure
  * @return @c 0 on success,
  *         otherwise a negative error value on failure
@@ -75,7 +75,7 @@ extern int storage_get_internal_memory_size(struct statvfs *buf);
 
 /**
  * @brief Gets the external memory size.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
  * @param[out] buf A pointer to a statvfs structure
  * @return @c 0 on success,
  *         otherwise a negative error value on failure
index 7e7ef02..1850b5f 100644 (file)
@@ -39,7 +39,6 @@
 #define STORAGE_CONF_FILE      "/etc/storage/libstorage.conf"
 
 
-#define MATCH(a, b)    (!strncmp(a, b, strlen(a)))
 #define SET_CONF(a, b) (a = (b > 0.0 ? b : a))
 
 struct storage_config_info {
@@ -60,7 +59,7 @@ static int load_config(struct parse_result *result, void *user_data)
        if (!info)
                return -EINVAL;
 
-       if (!MATCH(result->section, "STORAGE"))
+       if (strncmp(result->section, "STORAGE", strlen(result->section) + 1))
                return -EINVAL;
 
        name = result->name;
@@ -68,11 +67,11 @@ static int load_config(struct parse_result *result, void *user_data)
 
        if (info->check_size > 0 && check_size < 0)
                check_size = (storage_info.total_size < info->check_size) ? 1 : 0;
-       if (MATCH(name, "CHECK_SIZE"))
+       if (!strncmp(name, "CHECK_SIZE", strlen(name) + 1))
                info->check_size = atoi(value);
-       else if (check_size == 0 && MATCH(name, "RESERVE"))
+       else if (check_size == 0 && !strncmp(name, "RESERVE", strlen(name) + 1))
                info->reserved_size = atoi(value);
-       else if (check_size == 1 && MATCH(name, "RESERVE_LITE"))
+       else if (check_size == 1 && !strncmp(name, "RESERVE_LITE", strlen(name) + 1))
                info->reserved_size = atoi(value);
 
        return 0;