+ qemu_rbd_unescape(value);
+
+ if (!strcmp(name, "conf")) {
+ qdict_put(options, "conf", qstring_from_str(value));
+ } else if (!strcmp(name, "id")) {
+ qdict_put(options, "user" , qstring_from_str(value));
+ } else {
+ /* FIXME: This is pretty ugly, and not the right way to do this.
+ * These should be contained in a structure, and then
+ * passed explicitly as individual key/value pairs to
+ * rados. Consider this legacy code that needs to be
+ * updated. */
+ char *tmp = g_malloc0(max_keypair_size);
+ /* only use a delimiter if it is not the first keypair found */
+ /* These are sets of unknown key/value pairs we'll pass along
+ * to ceph */
+ if (keypairs[0]) {
+ snprintf(tmp, max_keypair_size, ":%s=%s", name, value);
+ pstrcat(keypairs, max_keypair_size, tmp);
+ } else {
+ snprintf(keypairs, max_keypair_size, "%s=%s", name, value);
+ }
+ g_free(tmp);
+ }