From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 0D2E11A113E for ; Tue, 5 Jan 2016 12:10:31 +1100 (AEDT) Received: from localhost (172.110.7.206 [172.110.7.206]) by mx.zohomail.com with SMTPS id 1451956227374976.8149548932795; Mon, 4 Jan 2016 17:10:27 -0800 (PST) From: OpenBMC Patches To: openbmc@lists.ozlabs.org Subject: [PATCH phosphor-host-ipmid v4] Add get/set ipmid command support with correct DBUS property handling. Date: Mon, 4 Jan 2016 19:10:25 -0600 Message-Id: <1451956226-19954-1-git-send-email-openbmc-patches@stwcx.xyz> X-Mailer: git-send-email 2.6.4 X-Zoho-Virus-Status: 1 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 01:10:33 -0000 1) Two methods to handle the dbus property set and get: a) dbus_set_property() b) dbus_get_property() 2) The property is stored as a 10 character strings which representsd 5-byte information. 3) ipmid set method is registered and implemented since petitboot will use it to clear the boot options. 4) Get service name via object mapper a) The connection name is got via objectmapper. b) The method used to get the connection name is object_mapper_get_connection(). c) dbus_get_property/dbus_set_property will get the connection name via the above method instead of hard coding. 5) Error code are properly handled. 6) Use sprinf/sscanf for int/string conversion. a) Instead of reinventing the wheel by defining methods converting int to string, use sprintf/sscanf should be a more clean and robust way. https://github.com/openbmc/phosphor-host-ipmid/pull/55 shgoupf (1): Add get/set boot option ipmid command support with correct DBUS property handling. chassishandler.C | 492 +++++++++++++++++++++++++++++++++++++++++++++---------- chassishandler.h | 18 ++ 2 files changed, 423 insertions(+), 87 deletions(-) -- 2.6.4