}
}
- /* Close load element */
- ret = mi_lttng_writer_close_element(writer);
+ /* Print override elements */
+ ret = mi_lttng_writer_open_element(writer, mi_lttng_element_load_overrides);
+ if (ret) {
+ goto end;
+ }
+
+ /* Session name override element */
+ if (opt_override_session_name) {
+ ret = mi_lttng_writer_write_element_string(writer,
+ config_element_name, opt_override_session_name);
+ if (ret) {
+ goto end;
+ }
+ }
+
+ /* Session url override element */
+ if (opt_override_url) {
+ ret = mi_lttng_writer_write_element_string(writer,
+ mi_lttng_element_load_override_url,
+ opt_override_url);
+ if (ret) {
+ goto end;
+ }
+ }
+ /* Close override and load element */
+ ret = mi_lttng_close_multi_element(writer, 2);
end:
return ret;
}
<xs:all>
<xs:element name="session" type="tns:session_type" />
<xs:element name="path" type="xs:string" />
+ <xs:element name="overrides" type="tns:overrides_type" />
+ </xs:all>
+ </xs:complexType>
+
+ <!-- Maps to the override parameters of the load command -->
+ <xs:complexType name="overrides_type">
+ <xs:all>
+ <xs:element name="name" type="tns:name_type" minOccurs="0" />
+ <xs:element name="url" type="xs:string" minOccurs="0" />
</xs:all>
</xs:complexType>
/* Strings related to load command */
const char * const mi_lttng_element_load = "load";
+LTTNG_HIDDEN const char * const mi_lttng_element_load_overrides = "overrides";
+LTTNG_HIDDEN const char * const mi_lttng_element_load_override_url = "url";
/* General elements of mi_lttng */
const char * const mi_lttng_element_empty = "";
/* Strings related to load command */
extern const char * const mi_lttng_element_load;
+LTTNG_HIDDEN const char * const mi_lttng_element_load_overrides;
+LTTNG_HIDDEN const char * const mi_lttng_element_load_override_url;
/* General element of mi_lttng */
extern const char * const mi_lttng_element_empty;