summaryrefslogtreecommitdiffstats
path: root/chassishandler.cpp
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2018-11-29 14:31:24 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2018-12-20 10:45:26 +0000
commit0021f84939a8e82ae9ed04581c2c18e86d0f0b51 (patch)
tree9424bbf044304b05c46e90df22a713b0c7d0ff07 /chassishandler.cpp
parent343d0611277a7506bfb4aba9be6a4028b3f80a13 (diff)
downloadphosphor-host-ipmid-0021f84939a8e82ae9ed04581c2c18e86d0f0b51.tar.gz
phosphor-host-ipmid-0021f84939a8e82ae9ed04581c2c18e86d0f0b51.zip
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>
Diffstat (limited to 'chassishandler.cpp')
-rw-r--r--chassishandler.cpp134
1 files changed, 0 insertions, 134 deletions
diff --git a/chassishandler.cpp b/chassishandler.cpp
index d4ce0e4..4b42b3c 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -88,7 +88,6 @@ void register_netfn_chassis_functions() __attribute__((constructor));
// 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 @@ constexpr auto minutesPerCount = 60;
} // 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;
OpenPOWER on IntegriCloud