diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-10-13 11:54:04 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-10-13 11:54:04 +0100 |
commit | f51aae032a452ffdbbe69aa53b11e350bd2ed072 (patch) | |
tree | a3a60480e6876a1ff7717d3e342547445bc53863 /tools/libxl/libxl_xshelp.c | |
parent | ab223ad3d65f6f3a822df69eb2b24e786c3a888d (diff) | |
download | xen-f51aae032a452ffdbbe69aa53b11e350bd2ed072.tar.gz xen-f51aae032a452ffdbbe69aa53b11e350bd2ed072.tar.bz2 xen-f51aae032a452ffdbbe69aa53b11e350bd2ed072.zip |
libxl: remove xs_writev function
It isn't actually being used to write a vector at the only callsite
and can easily be implemented using xs_write.
Furthermore the old implementation used to leak both the key and value
strings.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_xshelp.c')
-rw-r--r-- | tools/libxl/libxl_xshelp.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c index 4840ededc8..3dc9239bcb 100644 --- a/tools/libxl/libxl_xshelp.c +++ b/tools/libxl/libxl_xshelp.c @@ -24,26 +24,6 @@ #include "libxl.h" #include "libxl_internal.h" -int xs_writev(struct xs_handle *xsh, xs_transaction_t t, char *dir, char *kvs[]) -{ - char *path; - int i; - - if (!kvs) - return 0; - - for (i = 0; kvs[i] != NULL; i += 2) { - if (asprintf(&path, "%s/%s", dir, kvs[i]) < 0) - return -1; - if (path && kvs[i + 1]) { - int length = strlen(kvs[i + 1]); - xs_write(xsh, t, path, kvs[i + 1], length); - } - free(path); - } - return 0; -} - char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, int length) { char **kvs; |