LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* filenames with spaces in /sys?
@ 2008-04-27 18:35 Christian Kujau
  2008-04-27 18:54 ` David Woodhouse
  2008-04-28 15:31 ` Scott Wood
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Kujau @ 2008-04-27 18:35 UTC (permalink / raw)
  To: dwmw2; +Cc: linuxppc-dev

Hi,

I was a bit puzzled today when I came across
/sys/devices/platform/pmu-battery.0/power_supply/PMU battery 0/power
and thought to myself: why are there spaces in "PMU battery 0"? Wouldn't
../pmu-battery.0/power_supply/PMU_battery_0/power be feasible too? I find 
it rather annoying to special case the spaces whenever to look for 
something in /sys, when I'm so used not to when doing the same 
find/grep/xargs stuff in /usr/src/linux.

There are ~2000 directories in my /sys but only a handful contain spaces:

# find /sys/ -type d -regex '.*\ .*' | sort -u
/sys/bus/mdio_bus/drivers/Broadcom BCM5411
/sys/bus/mdio_bus/drivers/Broadcom BCM5421
/sys/bus/mdio_bus/drivers/Broadcom BCM5461
/sys/bus/mdio_bus/drivers/Broadcom BCM5464
/sys/bus/mdio_bus/drivers/Broadcom BCM5481
/sys/bus/mdio_bus/drivers/Broadcom BCM5482
/sys/bus/mdio_bus/drivers/Generic PHY
/sys/devices/platform/pmu-battery.0/power_supply/PMU battery 0
/sys/devices/platform/pmu-battery.0/power_supply/PMU battery 0/power

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

Thanks,
Christian.
-- 
BOFH excuse #373:

Suspicious pointer corrupted virtual machine

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

end of thread, other threads:[~2008-04-29 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 18:35 filenames with spaces in /sys? Christian Kujau
2008-04-27 18:54 ` David Woodhouse
2008-04-27 19:44   ` [PATCH] " Christian Kujau
2008-04-28 15:31 ` Scott Wood
2008-04-29 21:54   ` Christian Kujau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox