Towards less magic strings.

Patrick Williams patrick at stwcx.xyz
Fri Sep 15 19:08:16 AEST 2023


On Thu, Sep 14, 2023 at 08:01:30AM -0600, Bills, Jason M wrote:

> I have seen a couple advantages to the magic strings that seem to make 
> debugging easier between using something like busctl on a system and 
> looking at the source code.
> 
> One is going from busctl to source, it's easy to copy the string from 
> busctl and search the source for that string.
> 
> The other is going from source to busctl, it's easy to copy the strings 
> from the source into busctl to see the results from D-Bus.
> 
> Do you have any tips on how to do these kinds of busctl<->source 
> conversions using dbus-YAML that will help as we start removing the 
> magic strings?

Great question.

The conversion is straight-forward but there isn't currently a tool
to do it.  I could probably hack up something pretty quick that would
assist with the conversions.

I know we've generally refrained from adding debug tools into the image,
but it seems that `busctl` is pretty "hands-on" for many users.  I'm
thinking of working on a tool that will be provided by the
phosphor-dbus-interfaces package that will be smart-busctl.  If anyone
has opinions on that, I'm interested to hear them.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20230915/8b38ac97/attachment-0001.sig>


More information about the openbmc mailing list