summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2019-01-08 10:59:42 -0600
committerAndrew Geissler <geissonator@yahoo.com>2019-01-08 11:01:43 -0600
commit8192be92b9bf50450eb309a8798b3895bfdae471 (patch)
tree836442313a4f2191745e9566c355c558fc507c28 /tools
parent14269fbcc15fd0e764f672de144d44e8ee26dd78 (diff)
downloadsdbusplus-8192be92b9bf50450eb309a8798b3895bfdae471.tar.gz
sdbusplus-8192be92b9bf50450eb309a8798b3895bfdae471.zip
Revert "Fix incorrect defaultValue in generated server.hpp"
This reverts commit 14269fbcc15fd0e764f672de144d44e8ee26dd78. This caused the following compile failure in phosphor-dbus-interfaces: 16:52:02 make[1]: Entering directory '/phosphor-dbus-interfaces-99b5aaa499c2f1a71a031051136744ad1e7df869' 16:52:02 CXX libphosphor_dbus_la-libphosphor_dbus.lo 16:52:05 In file included from libphosphor_dbus.cpp:16151:0: 16:52:05 ./xyz/openbmc_project/User/Ldap/Config/server.hpp:195:53: error: expected unqualified-id before numeric constant 16:52:05 SearchScope _lDAPSearchScope = SearchScope::0; 16:52:05 ^ 16:52:05 make[1]: *** [libphosphor_dbus_la-libphosphor_dbus.lo] Error 1 16:52:08 make: *** [all] Error 2 Change-Id: Ie4c2f99d08b96845da86634ad73b9c8af56b656c Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/sdbusplus/property.py6
-rw-r--r--tools/sdbusplus/templates/interface.mako.server.hpp2
2 files changed, 1 insertions, 7 deletions
diff --git a/tools/sdbusplus/property.py b/tools/sdbusplus/property.py
index c74754d..33c7e25 100644
--- a/tools/sdbusplus/property.py
+++ b/tools/sdbusplus/property.py
@@ -11,12 +11,6 @@ class Property(NamedElement, Renderer):
self.flags = kwargs.pop('flags', [])
self.errors = kwargs.pop('errors', [])
- # Convert True/False to 'true'/'false'
- # because it will be rendered as C++ code
- if (self.defaultValue is not None and
- isinstance(self.defaultValue, bool)):
- self.defaultValue = 'true' if self.defaultValue else 'false'
-
super(Property, self).__init__(**kwargs)
def is_enum(self):
diff --git a/tools/sdbusplus/templates/interface.mako.server.hpp b/tools/sdbusplus/templates/interface.mako.server.hpp
index 0774fe5..b263c7a 100644
--- a/tools/sdbusplus/templates/interface.mako.server.hpp
+++ b/tools/sdbusplus/templates/interface.mako.server.hpp
@@ -139,7 +139,7 @@ ${ m.cpp_prototype(loader, interface=interface, ptype='callback-header') }
sdbusplus::SdBusInterface *_intf;
% for p in interface.properties:
- % if p.defaultValue is not None:
+ % if p.defaultValue:
${p.cppTypeParam(interface.name)} _${p.camelCase} = \
% if p.is_enum():
${p.cppTypeParam(interface.name)}::\
OpenPOWER on IntegriCloud