aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 05:46:47 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 05:46:47 +0100
commita1b0c86af35ef878a104183c9bec2c6c79658703 (patch)
treee0c32851caf769c018c3d72cd94c23d0fe5f8dab /src/daemon.h
parentrun_job_or_hook is not static (diff)
downloadsat-a1b0c86af35ef878a104183c9bec2c6c79658703.tar.gz
sat-a1b0c86af35ef878a104183c9bec2c6c79658703.tar.bz2
sat-a1b0c86af35ef878a104183c9bec2c6c79658703.tar.xz
impelement satd-add
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/daemon.h')
-rw-r--r--src/daemon.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/daemon.h b/src/daemon.h
index ddb2854..562ec52 100644
--- a/src/daemon.h
+++ b/src/daemon.h
@@ -117,6 +117,28 @@ struct job {
/**
+ * Wrapper for `pread` that reads the required amount of data.
+ *
+ * @param fildes See pread(3).
+ * @param buf See pread(3).
+ * @param nbyte See pread(3).
+ * @param offset See pread(3).
+ * @return See pread(3), only short if the file is shorter.
+ */
+ssize_t preadn(int fildes, void *buf, size_t nbyte, size_t offset);
+
+/**
+ * Wrapper for `pwrite` that writes all specified data.
+ *
+ * @param fildes See pwrite(3).
+ * @param buf See pwrite(3).
+ * @param nbyte See pwrite(3).
+ * @param offset See pwrite(3).
+ * @return See pwrite(3).
+ */
+ssize_t pwriten(int fildes, void *buf, size_t nbyte, size_t offset);
+
+/**
* Wrapper for `read` that reads all available data.
*
* Sets `errno` to `EBADMSG` on success.