All of lore.kernel.org
 help / color / mirror / Atom feed
* FruDevice - next device name matching
@ 2019-08-13 16:03 Patrick Venture
  2019-08-13 16:05 ` James Feist
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Venture @ 2019-08-13 16:03 UTC (permalink / raw)
  To: James Feist, Tanous, Ed; +Cc: OpenBMC Maillist, Peter Lundgren

I wanted to verify this was the expected behavior:

      |-/xyz/openbmc_project/FruDevice/Card
      |-/xyz/openbmc_project/FruDevice/Card_0
      |-/xyz/openbmc_project/FruDevice/Card_01
      |-/xyz/openbmc_project/FruDevice/Card_012
      |-/xyz/openbmc_project/FruDevice/Card_0123

It's fine if that is, albeit in the case where we have 11 cards,
that's going to be problematic.  My theory is, it's meant to increment
the last number part of the name.  This can be done by a regex parsing
of the name string and then pulling out the number, incrementing and
tracking the highest number hit.

https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L869

If that's what it should be doing, then I can submit a patch after
some testing, I just wanted to verify.

Patrick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FruDevice - next device name matching
  2019-08-13 16:03 FruDevice - next device name matching Patrick Venture
@ 2019-08-13 16:05 ` James Feist
  2019-08-13 16:06   ` Patrick Venture
  0 siblings, 1 reply; 3+ messages in thread
From: James Feist @ 2019-08-13 16:05 UTC (permalink / raw)
  To: Patrick Venture, Tanous, Ed; +Cc: OpenBMC Maillist, Peter Lundgren

On 8/13/19 9:03 AM, Patrick Venture wrote:
> I wanted to verify this was the expected behavior:
> 
>        |-/xyz/openbmc_project/FruDevice/Card
>        |-/xyz/openbmc_project/FruDevice/Card_0
>        |-/xyz/openbmc_project/FruDevice/Card_01
>        |-/xyz/openbmc_project/FruDevice/Card_012
>        |-/xyz/openbmc_project/FruDevice/Card_0123
> 
> It's fine if that is, albeit in the case where we have 11 cards,
> that's going to be problematic.  My theory is, it's meant to increment
> the last number part of the name.  This can be done by a regex parsing
> of the name string and then pulling out the number, incrementing and
> tracking the highest number hit.
> 
> https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L869
> 
> If that's what it should be doing, then I can submit a patch after
> some testing, I just wanted to verify.

The path name just needs to be different, that patch would be great imo.

Thanks

James

> 
> Patrick
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FruDevice - next device name matching
  2019-08-13 16:05 ` James Feist
@ 2019-08-13 16:06   ` Patrick Venture
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Venture @ 2019-08-13 16:06 UTC (permalink / raw)
  To: James Feist; +Cc: Tanous, Ed, OpenBMC Maillist, Peter Lundgren

On Tue, Aug 13, 2019 at 9:05 AM James Feist <james.feist@linux.intel.com> wrote:
>
> On 8/13/19 9:03 AM, Patrick Venture wrote:
> > I wanted to verify this was the expected behavior:
> >
> >        |-/xyz/openbmc_project/FruDevice/Card
> >        |-/xyz/openbmc_project/FruDevice/Card_0
> >        |-/xyz/openbmc_project/FruDevice/Card_01
> >        |-/xyz/openbmc_project/FruDevice/Card_012
> >        |-/xyz/openbmc_project/FruDevice/Card_0123
> >
> > It's fine if that is, albeit in the case where we have 11 cards,
> > that's going to be problematic.  My theory is, it's meant to increment
> > the last number part of the name.  This can be done by a regex parsing
> > of the name string and then pulling out the number, incrementing and
> > tracking the highest number hit.
> >
> > https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L869
> >
> > If that's what it should be doing, then I can submit a patch after
> > some testing, I just wanted to verify.
>
> The path name just needs to be different, that patch would be great imo.

Yeah, the code as it stands works fine for this.  The names are unique
and I'm able to properly identify them, etc.

>
> Thanks
>
> James
>
> >
> > Patrick
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-13 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-13 16:03 FruDevice - next device name matching Patrick Venture
2019-08-13 16:05 ` James Feist
2019-08-13 16:06   ` Patrick Venture

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.