diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-08-14 13:55:00 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-30 21:25:25 +0100 |
commit | 878212cb8d7eda9ec80b96695e115c14cab17664 (patch) | |
tree | 2e782c57742fd6790159e0e90d18c0e49fc33267 /daemon/daemon.h | |
parent | 9aad41f14548acd0b012f4b333088e62eefe8e8c (diff) | |
download | libguestfs-878212cb8d7eda9ec80b96695e115c14cab17664.tar.gz libguestfs-878212cb8d7eda9ec80b96695e115c14cab17664.tar.xz libguestfs-878212cb8d7eda9ec80b96695e115c14cab17664.zip |
daemon: New utility functions 'join_strings', 'concat_strings'.
Useful functions for concatenating strings together.
(cherry picked from commit 637b06ab1384f0c904715ba76fc759dac1b95500)
Diffstat (limited to 'daemon/daemon.h')
-rw-r--r-- | daemon/daemon.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/daemon.h b/daemon/daemon.h index fa0e054d..6df2580a 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -82,6 +82,13 @@ extern void free_stringslen (char **argv, size_t len); extern void sort_device_names (char **argv, size_t len); extern int compare_device_names (const char *a, const char *b); +/* Concatenate strings, optionally with a separator string between + * each. On error, these return NULL but do NOT call reply_with_* nor + * free anything. + */ +extern char *concat_strings (char *const *argv); +extern char *join_strings (const char *separator, char *const *argv); + extern char **split_lines (char *str); #define command(out,err,name,...) commandf((out),(err),0,(name),__VA_ARGS__) |