From: Christian Kujau <lists@nerdbynature.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] Re: filenames with spaces in /sys?
Date: Sun, 27 Apr 2008 21:44:45 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.1.10.0804272137570.11017@sheep.housecafe.de> (raw)
In-Reply-To: <1209322478.25560.84.camel@pmac.infradead.org>
On Sun, 27 Apr 2008, David Woodhouse wrote:
>> Hm, OTOH /proc also does contain some elements with spaces in it (e.g.
>> /proc/irq/47/GPIO1 ADB)...so, in short: would patches be accepted to
>> turn ' ' into '_' again (if they don't break too much userspace stuff)?
>
> I see no reason not to for the battery class, certainly.
Thanks. By changing drivers/power/pmu_battery.c I now have '_' instead of
' ' (spaces) in /sys:
/sys/devices/platform/pmu-battery.0/power_supply/PMU_battery_0
/sys/class/power_supply/PMU_battery_0
I'm still not sure if some userspace tool out there uses the
old paths and will break now.
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
--- linux-2.6-git/drivers/power/pmu_battery.c.orig 2008-04-27 20:26:34.000000000 +0200
+++ linux-2.6-git/drivers/power/pmu_battery.c 2008-04-27 20:31:19.000000000 +0200
@@ -159,7 +159,7 @@ static int __init pmu_bat_init(void)
if (!pbat)
break;
- sprintf(pbat->name, "PMU battery %d", i);
+ sprintf(pbat->name, "PMU_battery_%d", i);
pbat->bat.name = pbat->name;
pbat->bat.properties = pmu_bat_props;
pbat->bat.num_properties = ARRAY_SIZE(pmu_bat_props);
C.
--
BOFH excuse #189:
SCSI's too wide.
next prev parent reply other threads:[~2008-04-27 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-27 18:35 filenames with spaces in /sys? Christian Kujau
2008-04-27 18:54 ` David Woodhouse
2008-04-27 19:44 ` Christian Kujau [this message]
2008-04-28 15:31 ` Scott Wood
2008-04-29 21:54 ` Christian Kujau
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=alpine.DEB.1.10.0804272137570.11017@sheep.housecafe.de \
--to=lists@nerdbynature.de \
--cc=dwmw2@infradead.org \
--cc=linuxppc-dev@ozlabs.org \
/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