Remove unused legacy code referencing org.openbmc.settings.Host
Resolves openbmc/phosphor-host-ipmid#115
Change-Id: Iab7f878b8b3011caa95f532f99062af9cbc1c33c
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/chassishandler.cpp b/chassishandler.cpp
index d4ce0e4..4b42b3c 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -88,7 +88,6 @@
// Service name should be referenced by connection name got via object mapper
const char* settings_object_name = "/org/openbmc/settings/host0";
const char* settings_intf_name = "org.freedesktop.DBus.Properties";
-const char* host_intf_name = "org.openbmc.settings.Host";
const char* identify_led_object_name =
"/xyz/openbmc_project/led/groups/enclosure_identify";
@@ -179,139 +178,6 @@
} // namespace poh
-// TODO : Can remove the below function as we have
-// new functions which uses sdbusplus.
-//
-// openbmc/openbmc#1489
-int dbus_get_property(const char* name, char** buf)
-{
- sd_bus_error error = SD_BUS_ERROR_NULL;
- sd_bus_message* m = NULL;
- sd_bus* bus = NULL;
- char* temp_buf = NULL;
- char* connection = NULL;
- int r;
-
- // Get the system bus where most system services are provided.
- bus = ipmid_get_sd_bus_connection();
-
- r = mapper_get_service(bus, settings_object_name, &connection);
- if (r < 0)
- {
- log<level::ERR>("Failed to get connection",
- entry("OBJ_NAME=%s", settings_object_name),
- entry("ERRNO=0x%X", -r));
- goto finish;
- }
-
- /*
- * Bus, service, object path, interface and method are provided to call
- * the method.
- * Signatures and input arguments are provided by the arguments at the
- * end.
- */
- r = sd_bus_call_method(bus, connection, /* service to contact */
- settings_object_name, /* object path */
- settings_intf_name, /* interface name */
- "Get", /* method name */
- &error, /* object to return error in */
- &m, /* return message on success */
- "ss", /* input signature */
- host_intf_name, /* first argument */
- name); /* second argument */
-
- if (r < 0)
- {
- log<level::ERR>("Failed to issue Get method call",
- entry("ERRNO=0x%X", r));
- goto finish;
- }
-
- /*
- * The output should be parsed exactly the same as the output formatting
- * specified.
- */
- r = sd_bus_message_read(m, "v", "s", &temp_buf);
- if (r < 0)
- {
- log<level::ERR>("Failed to parse response message",
- entry("ERRNO=0x%X", -r));
- goto finish;
- }
-
- *buf = strdup(temp_buf);
- /* *buf = (char*) malloc(strlen(temp_buf));
- if (*buf) {
- strcpy(*buf, temp_buf);
- }
- */
-
-finish:
- sd_bus_error_free(&error);
- sd_bus_message_unref(m);
- free(connection);
-
- return r;
-}
-
-// TODO : Can remove the below function as we have
-// new functions which uses sdbusplus.
-//
-// openbmc/openbmc#1489
-
-int dbus_set_property(const char* name, const char* value)
-{
- sd_bus_error error = SD_BUS_ERROR_NULL;
- sd_bus_message* m = NULL;
- sd_bus* bus = NULL;
- char* connection = NULL;
- int r;
-
- // Get the system bus where most system services are provided.
- bus = ipmid_get_sd_bus_connection();
-
- r = mapper_get_service(bus, settings_object_name, &connection);
- if (r < 0)
- {
- log<level::ERR>("Failed to get connection",
- entry("OBJ_NAME=%s", settings_object_name),
- entry("ERRNO=0x%X", -r));
- goto finish;
- }
-
- /*
- * Bus, service, object path, interface and method are provided to call
- * the method.
- * Signatures and input arguments are provided by the arguments at the
- * end.
- */
- r = sd_bus_call_method(bus, connection, /* service to contact */
- settings_object_name, /* object path */
- settings_intf_name, /* interface name */
- "Set", /* method name */
- &error, /* object to return error in */
- &m, /* return message on success */
- "ssv", /* input signature */
- host_intf_name, /* first argument */
- name, /* second argument */
- "s", /* third argument */
- value); /* fourth argument */
-
- if (r < 0)
- {
- log<level::ERR>("Failed to issue Set method call",
- entry("ERRNO=0x%X", r));
- goto finish;
- }
-
-finish:
- sd_bus_error_free(&error);
- sd_bus_message_unref(m);
- free(connection);
-
- return r;
-}
-
struct get_sys_boot_options_t
{
uint8_t parameter;