summaryrefslogtreecommitdiff
path: root/src/shared/fileio.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-04 11:38:23 -0400
committerLennart Poettering <lennart@poettering.net>2013-05-06 22:51:47 +0200
commitb4bc041b1756aab117df40abdcc16a9dc2e72d07 (patch)
tree4fa67fc4df31bc5f41f0bef92cb38910f824ca7b /src/shared/fileio.h
parent9494131b91decc5300f9bbfa0568e64546d7917a (diff)
fileio: split write_one_line_file into two
The new function allows one to write to an already open file.
Diffstat (limited to 'src/shared/fileio.h')
-rw-r--r--src/shared/fileio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/fileio.h b/src/shared/fileio.h
index 34ed3c1e97..0ca6878ea4 100644
--- a/src/shared/fileio.h
+++ b/src/shared/fileio.h
@@ -21,10 +21,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stddef.h>
+#include <stdio.h>
+
#include "macro.h"
+int write_string_to_file(FILE *f, const char *line);
int write_string_file(const char *fn, const char *line);
int write_string_file_atomic(const char *fn, const char *line);
+
int read_one_line_file(const char *fn, char **line);
int read_full_file(const char *fn, char **contents, size_t *size);