openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ed Tanous <edtanous@google.com>
To: Patrick Williams <patrick@stwcx.xyz>
Cc: Vernon Mauery <vernon.mauery@linux.intel.com>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
	Tom Joseph <rushtotom@gmail.com>,
	Heyi Guo <guoheyi@linux.alibaba.com>,
	Oskar Senft <osk@google.com>,
	Johnathan Mantey <johnathanx.mantey@intel.com>,
	"Puli, Apparao" <apparao.puli@linux.intel.com>
Subject: Re: [Question] How can we use underscore "_" in sensor name?
Date: Wed, 15 Sep 2021 09:35:43 -0700	[thread overview]
Message-ID: <CAH2-KxB9aW7Aj6JjrAAZLPW=OVJe4FTUoAXszR6dTBCF7LYK4Q@mail.gmail.com> (raw)
In-Reply-To: <YUId8mvBHn6DOzHu@heinlein>

On Wed, Sep 15, 2021 at 9:23 AM Patrick Williams <patrick@stwcx.xyz> wrote:
>
> On Wed, Sep 15, 2021 at 09:54:47AM -0400, Oskar Senft wrote:
> > +1 to using something more explicit, like %20 instead of "_" for
> > replacing " " for D-bus names.
>
> Ed had previously added code to sdbusplus to consistently do conversions like
> this, in the same way that systemd tends to do conversions.  I think we just
> need to convert the affected repositories here to use these sdbusplus
> object_path types rather than creating their own strings.
>
> https://github.com/openbmc/sdbusplus/blob/master/src/message/native_types.cpp#L53
>
> If paths are encoded this way, we are able to clearly differentiate between a
> desired space and an underscore because the spaces become encoded as something
> like `_20`, similar to the proposal here.

For what it's worth, I added this code to solve this exact problem
(although in my case I wanted to use dashes in sensor names) I just
haven't pushed the final sets of patches yet to turn it on.  I'm glad
to see all the interest in this;  I think the bulk of the hard work is
done, and all we should need is changesets pushed to bmcweb,
dbus-sensors, and ipmi-dynamic to use the operator/ and filename()
methods to construct the dbus paths.  Keep in mind, IPMI will need
some escaping, as IPMI SDRs assume ASCII, and bmcweb will need to be
flushed through the urlencode method to ensure we're encoding our URIs
properly.

If this is important to people, feel free to push and test the
patches, otherwise it's still on my list to get done and I'll CC this
thread when any new patchsets are pushed.

>
> --
> Patrick Williams

  reply	other threads:[~2021-09-15 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 10:49 [Question] How can we use underscore "_" in sensor name? Heyi Guo
2021-09-13 14:57 ` Johnathan Mantey
2021-09-15  4:57   ` Heyi Guo
2021-09-15 13:54     ` Oskar Senft
2021-09-15 16:23       ` Patrick Williams
2021-09-15 16:35         ` Ed Tanous [this message]
2021-09-18  2:38           ` Heyi Guo
2021-09-15 14:36     ` Johnathan Mantey
2021-09-13 15:22 ` Phil Eichinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2-KxB9aW7Aj6JjrAAZLPW=OVJe4FTUoAXszR6dTBCF7LYK4Q@mail.gmail.com' \
    --to=edtanous@google.com \
    --cc=apparao.puli@linux.intel.com \
    --cc=guoheyi@linux.alibaba.com \
    --cc=johnathanx.mantey@intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=osk@google.com \
    --cc=patrick@stwcx.xyz \
    --cc=rushtotom@gmail.com \
    --cc=vernon.mauery@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).