diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-03-12 15:13:33 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-03-12 15:13:33 +0100 |
| commit | dd428301eb6f02542015121d7b08d9997f137e50 (patch) | |
| tree | 5530189f63510287d65268fc36025bdbc9414c00 /shared/systemd/src/basic/io-util.c | |
| parent | bbae86d3d2997a853ca0365e8eb7a3ca7489ee09 (diff) | |
New upstream version 1.15.91
Diffstat (limited to 'shared/systemd/src/basic/io-util.c')
| -rw-r--r-- | shared/systemd/src/basic/io-util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/shared/systemd/src/basic/io-util.c b/shared/systemd/src/basic/io-util.c index f7c25915..3f47eff5 100644 --- a/shared/systemd/src/basic/io-util.c +++ b/shared/systemd/src/basic/io-util.c @@ -10,8 +10,10 @@ #include <unistd.h> #include "io-util.h" +#include "string-util.h" #include "time-util.h" +#if 0 /* NM_IGNORED */ int flush_fd(int fd) { struct pollfd pollfd = { .fd = fd, @@ -55,6 +57,7 @@ int flush_fd(int fd) { count += (int) l; } } +#endif /* NM_IGNORED */ ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) { uint8_t *p = buf; @@ -115,6 +118,7 @@ int loop_read_exact(int fd, void *buf, size_t nbytes, bool do_poll) { return 0; } +#if 0 /* NM_IGNORED */ int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) { const uint8_t *p = buf; @@ -173,6 +177,7 @@ int pipe_eof(int fd) { return pollfd.revents & POLLHUP; } +#endif /* NM_IGNORED */ int fd_wait_for_event(int fd, int event, usec_t t) { @@ -193,6 +198,7 @@ int fd_wait_for_event(int fd, int event, usec_t t) { return pollfd.revents; } +#if 0 /* NM_IGNORED */ static size_t nul_length(const uint8_t *p, size_t sz) { size_t n = 0; @@ -254,3 +260,13 @@ ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length) { return q - (const uint8_t*) p; } + +char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) { + char *x; + + x = strappend(field, value); + if (x) + iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(x); + return x; +} +#endif /* NM_IGNORED */ |