linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sysfs filenames with spaces
@ 2020-10-06  2:41 Joe Perches
  2020-10-13 17:17 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2020-10-06  2:41 UTC (permalink / raw)
  To: LKML

This doesn't seem like a great idea to me.

For my system I've got:

/sys/devices/platform/Fixed MDIO bus.0/
/sys/bus/platform/drivers/int3401 thermal/
/sys/bus/platform/drivers/int3403 thermal/
/sys/bus/platform/drivers/int3400 thermal/
/sys/bus/mdio_bus/drivers/Generic PHY/
/sys/bus/mdio_bus/drivers/Generic Clause 45 PHY/
/sys/bus/pnp/drivers/i8042 aux/
/sys/bus/pnp/drivers/i8042 kbd/
/sys/bus/i2c/drivers/CHT Whiskey Cove PMIC/

Could these filenames be avoided in the future or
even renamed today?



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

* Re: sysfs filenames with spaces
  2020-10-06  2:41 sysfs filenames with spaces Joe Perches
@ 2020-10-13 17:17 ` Pavel Machek
  2020-10-13 19:48   ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2020-10-13 17:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: LKML

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

On Mon 2020-10-05 19:41:15, Joe Perches wrote:
> This doesn't seem like a great idea to me.
> 
> For my system I've got:
> 
> /sys/devices/platform/Fixed MDIO bus.0/
> /sys/bus/platform/drivers/int3401 thermal/
> /sys/bus/platform/drivers/int3403 thermal/
> /sys/bus/platform/drivers/int3400 thermal/
> /sys/bus/mdio_bus/drivers/Generic PHY/
> /sys/bus/mdio_bus/drivers/Generic Clause 45 PHY/
> /sys/bus/pnp/drivers/i8042 aux/
> /sys/bus/pnp/drivers/i8042 kbd/
> /sys/bus/i2c/drivers/CHT Whiskey Cove PMIC/
> 
> Could these filenames be avoided in the future or
> even renamed today?

Does not look like great idea to me, either. Hmm. Is there filename
with "/" in it? :-)

But I guess you'd need to cc relevant maintainers and that this is
going to be a bit of whack-a-mole.

Best regards,
								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: sysfs filenames with spaces
  2020-10-13 17:17 ` Pavel Machek
@ 2020-10-13 19:48   ` Joe Perches
  2020-10-19 18:27     ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2020-10-13 19:48 UTC (permalink / raw)
  To: Pavel Machek; +Cc: LKML

On Tue, 2020-10-13 at 19:17 +0200, Pavel Machek wrote:
> On Mon 2020-10-05 19:41:15, Joe Perches wrote:
> > This doesn't seem like a great idea to me.
> > 
> > For my system I've got:
> > 
> > /sys/devices/platform/Fixed MDIO bus.0/
> > /sys/bus/platform/drivers/int3401 thermal/
> > /sys/bus/platform/drivers/int3403 thermal/
> > /sys/bus/platform/drivers/int3400 thermal/
> > /sys/bus/mdio_bus/drivers/Generic PHY/
> > /sys/bus/mdio_bus/drivers/Generic Clause 45 PHY/
> > /sys/bus/pnp/drivers/i8042 aux/
> > /sys/bus/pnp/drivers/i8042 kbd/
> > /sys/bus/i2c/drivers/CHT Whiskey Cove PMIC/
> > 
> > Could these filenames be avoided in the future or
> > even renamed today?
> 
> Does not look like great idea to me, either. Hmm. Is there filename
> with "/" in it? :-)
> 
> But I guess you'd need to cc relevant maintainers and that this is
> going to be a bit of whack-a-mole.

An option might be to convert any invalid filename
via an alloc and substitution in sysfs_add_file
and similar free in sysfs_remove_file.

Emitting a logging message describing any new name
would be useful too.



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

* Re: sysfs filenames with spaces
  2020-10-13 19:48   ` Joe Perches
@ 2020-10-19 18:27     ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2020-10-19 18:27 UTC (permalink / raw)
  To: Joe Perches; +Cc: LKML

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

On Tue 2020-10-13 12:48:49, Joe Perches wrote:
> On Tue, 2020-10-13 at 19:17 +0200, Pavel Machek wrote:
> > On Mon 2020-10-05 19:41:15, Joe Perches wrote:
> > > This doesn't seem like a great idea to me.
> > > 
> > > For my system I've got:
> > > 
> > > /sys/devices/platform/Fixed MDIO bus.0/
> > > /sys/bus/platform/drivers/int3401 thermal/
> > > /sys/bus/platform/drivers/int3403 thermal/
> > > /sys/bus/platform/drivers/int3400 thermal/
> > > /sys/bus/mdio_bus/drivers/Generic PHY/
> > > /sys/bus/mdio_bus/drivers/Generic Clause 45 PHY/
> > > /sys/bus/pnp/drivers/i8042 aux/
> > > /sys/bus/pnp/drivers/i8042 kbd/
> > > /sys/bus/i2c/drivers/CHT Whiskey Cove PMIC/
> > > 
> > > Could these filenames be avoided in the future or
> > > even renamed today?
> > 
> > Does not look like great idea to me, either. Hmm. Is there filename
> > with "/" in it? :-)
> > 
> > But I guess you'd need to cc relevant maintainers and that this is
> > going to be a bit of whack-a-mole.
> 
> An option might be to convert any invalid filename
> via an alloc and substitution in sysfs_add_file
> and similar free in sysfs_remove_file.
> 
> Emitting a logging message describing any new name
> would be useful too.

I believe that would be dangerous... renaming existing entries and
risking duplicities.

But ... some kind of warning when such entry is created might be good,
we'd then fix them manually.

Best regards,
								Pavel

-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2020-10-19 18:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06  2:41 sysfs filenames with spaces Joe Perches
2020-10-13 17:17 ` Pavel Machek
2020-10-13 19:48   ` Joe Perches
2020-10-19 18:27     ` Pavel Machek

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).