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 <[EMAIL PROTECTED]>

--- 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.
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to