Mi & save/load: add option to indent or not on config writer creation
[lttng-tools.git] / src / common / config / config.c
index a1ad95e462d7d3ef1060beff9ac3347b6d9b7cc6..4a07e99479adb7b0c7ddd0a1db434587f24aea1b 100644 (file)
@@ -354,7 +354,7 @@ end:
 }
 
 LTTNG_HIDDEN
 }
 
 LTTNG_HIDDEN
-struct config_writer *config_writer_create(int fd_output)
+struct config_writer *config_writer_create(int fd_output, int indent)
 {
        int ret;
        struct config_writer *writer;
 {
        int ret;
        struct config_writer *writer;
@@ -380,12 +380,12 @@ struct config_writer *config_writer_create(int fd_output)
 
        ret = xmlTextWriterSetIndentString(writer->writer,
                BAD_CAST config_xml_indent_string);
 
        ret = xmlTextWriterSetIndentString(writer->writer,
                BAD_CAST config_xml_indent_string);
-       if (ret)  {
+       if (ret) {
                goto error_destroy;
        }
 
                goto error_destroy;
        }
 
-       ret = xmlTextWriterSetIndent(writer->writer, 1);
-       if (ret)  {
+       ret = xmlTextWriterSetIndent(writer->writer, indent);
+       if (ret) {
                goto error_destroy;
        }
 
                goto error_destroy;
        }
 
This page took 0.028791 seconds and 5 git commands to generate.