aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSumit Garg <sumit.garg@linaro.org>2019-02-21 14:30:09 +0530
committerCyril Hrubis <chrubis@suse.cz>2019-02-25 14:04:33 +0100
commit0efad138483496b8e6294cd5c82dec4da7c7e8c9 (patch)
tree9f748fb72d0aca7dadccd0b07c51063e29c50b81 /include
parent9438b1071ea24be005905058cb80b8e26328ef19 (diff)
lib: split tst_fill_file() to create new tst_fill_fd()
Split tst_fill_file() api to create new tst_fill_fd() api which could be used to fill file using fd and allows syscalls tests to operate on fd. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Cyril Hrubis <chrubis@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/tst_fs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/tst_fs.h b/include/tst_fs.h
index 23f139ded..b2b19ada6 100644
--- a/include/tst_fs.h
+++ b/include/tst_fs.h
@@ -139,6 +139,15 @@ int tst_dir_is_empty_(void (*cleanup)(void), const char *name, int verbose);
int tst_get_path(const char *prog_name, char *buf, size_t buf_len);
/*
+ * Fill a file with specified pattern
+ * @fd: file descriptor
+ * @pattern: pattern
+ * @bs: block size
+ * @bcount: blocks count
+ */
+int tst_fill_fd(int fd, char pattern, size_t bs, size_t bcount);
+
+/*
* Creates/ovewrites a file with specified pattern
* @path: path to file
* @pattern: pattern