4 * Copyright IBM, Corp. 2010
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #include "qemu/osdep.h"
15 #include <glib/gprintf.h>
19 #include "9p-marshal.h"
21 void v9fs_string_free(V9fsString *str)
28 void GCC_FMT_ATTR(2, 3)
29 v9fs_string_sprintf(V9fsString *str, const char *fmt, ...)
33 v9fs_string_free(str);
36 str->size = g_vasprintf(&str->data, fmt, ap);
40 void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs)
42 v9fs_string_free(lhs);
43 v9fs_string_sprintf(lhs, "%s", rhs->data);