+ if (ivi_output->output)
+ weston_output_destroy(ivi_output->output);
+
+ return ret;
+}
+
+static void
+ivi_enable_remote_outputs(struct ivi_compositor *ivi)
+{
+ struct weston_config_section *remote_section = NULL;
+ const char *section_name;
+ struct weston_config *config = ivi->config;
+
+ while (weston_config_next_section(config, &remote_section, §ion_name)) {
+ if (strcmp(section_name, "remote-output"))
+ continue;
+
+ struct ivi_output *ivi_output = NULL;
+ bool output_found = false;
+ char *_name = NULL;
+
+ weston_config_section_get_string(remote_section,
+ "name", &_name, NULL);
+ wl_list_for_each(ivi_output, &ivi->outputs, link) {
+ if (!strcmp(ivi_output->name, _name)) {
+ output_found = true;
+ break;
+ }
+ }
+
+ if (output_found) {
+ free(_name);
+ continue;
+ }