aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2022-07-24 12:07:25 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2022-08-05 00:37:46 +0900
commitd0b3d4456dd8700b9065545d745f3fbf28ff0c91 (patch)
treed907fbd912715f894816b881670953b2f2bc4fbb
parent86f13970718ef5e0758ac4edfe7da2c354d19668 (diff)
Fix function interface descriptions
The librefop use doxygen to create interface document. Existing code has some description error in interface description. This patch fix these error. Bug-AGL: SPEC-4500 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> Change-Id: I83a68fb708a6c850f01559ab3780d1e9c3fdd7d9
-rw-r--r--lib/file-util.c4
-rw-r--r--lib/libredundancyfileop.c20
2 files changed, 19 insertions, 5 deletions
diff --git a/lib/file-util.c b/lib/file-util.c
index 652cfd3..880bcb4 100644
--- a/lib/file-util.c
+++ b/lib/file-util.c
@@ -12,7 +12,7 @@
/**
* INTR safe read
- * Interface spec is similar to read.
+ * Interface spec is similar to read system call.
*/
ssize_t safe_read(int fd, void *buf, size_t count)
{
@@ -43,7 +43,7 @@ ssize_t safe_read(int fd, void *buf, size_t count)
/**
* INTR safe write
- * Interface spec is similar to read.
+ * Interface spec is similar to write system call.
*/
ssize_t safe_write(int fd, void *buf, size_t count)
{
diff --git a/lib/libredundancyfileop.c b/lib/libredundancyfileop.c
index 6889d9f..2a0dc87 100644
--- a/lib/libredundancyfileop.c
+++ b/lib/libredundancyfileop.c
@@ -19,9 +19,11 @@ const char c_bk1_suffix[] = ".bk1";
const char c_new_suffix[] = ".tmp";
/**
- * Handle create function of refop.
+ * The refop handle create function.
+ * When you use refop, you shall call this function initially.
+ * The refop handle need to create per one file.
*
- * @param [out] handle Created refophandle
+ * @param [out] handle Created refop handle
* @param [in] directry Terget directry
* @param [in] filename Target file name.
*
@@ -89,7 +91,8 @@ refop_error_t refop_create_redundancy_handle(refop_handle_t *handle, const char
return REFOP_SUCCESS;
}
/**
- * Handle release function of refop.
+ * The refop handle release function.
+ * When you completed refop operation, you shall call this release function to release allocated memory.
*
* @param [in] handle Refop handle
*
@@ -109,6 +112,11 @@ refop_error_t refop_release_redundancy_handle(refop_handle_t handle)
/**
* The data set function of refop.
+ * When you want to write file, you call this function.
+ * This function is not support partial and append write,only to support all overwrite for file.
+ * If you write new data smaller than existing data, new data file truncated to new data file size.
+ * This function is not support multi threaded set and get with same handle.
+ * In case of multi threaded set and get using separate handle, these operation is support.
*
* @param [in] handle Refop handle
* @param [in] data Write data for set data.
@@ -145,6 +153,12 @@ refop_error_t refop_set_redundancy_data(refop_handle_t handle, uint8_t *data, in
}
/**
* The data get function of refop.
+ * When you want to read file, you call this function.
+ * When you set data size that smaller than existing file, this function read requested data size.
+ * When you set data size that larger than existing file, this function read existing file data size.
+ * How many data was reading, this function set to getsize.
+ * This function is not support multi threaded set and get with same handle.
+ * In case of multi threaded set and get using separate handle, these operation is support.
*
* @param [in] handle Refop handle
* @param [in] data Read buffer for get data.