mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: sysfs filenames with spaces
Date: Tue, 13 Oct 2020 12:48:49 -0700	[thread overview]
Message-ID: <575e7e2eb77ee5c26c3ac8fb6cb863890e971a16.camel@perches.com> (raw)
In-Reply-To: <20201013171754.GA29185@duo.ucw.cz>

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.



  reply	other threads:[~2020-10-13 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  2:41 Joe Perches
2020-10-13 17:17 ` Pavel Machek
2020-10-13 19:48   ` Joe Perches [this message]
2020-10-19 18:27     ` Pavel Machek

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=575e7e2eb77ee5c26c3ac8fb6cb863890e971a16.camel@perches.com \
    --to=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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

all inboxes | Powered by JetHome®