diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-04-16 17:05:27 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-04-16 17:05:27 +0300 |
commit | ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8 (patch) | |
tree | 12885a6778a0a746fc0ff62b0be4b75f368cebc9 /src/io.c | |
parent | 968dfbb8b376de2dc6f2441dc3966d1416ad0046 (diff) | |
download | apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.tar.gz apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.tar.bz2 apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.tar.xz apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.zip |
pkg: clean up writing of dependencies
Diffstat (limited to 'src/io.c')
-rw-r--r-- | src/io.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -492,3 +492,13 @@ struct apk_ostream *apk_ostream_to_file(const char *file, mode_t mode) return apk_ostream_to_fd(fd); } +size_t apk_ostream_write_string(struct apk_ostream *os, const char *string) +{ + size_t len; + + len = strlen(string); + if (os->write(os, string, len) != len) + return -1; + + return len; +} |