Henrique de Moraes Holschuh пишет: > On Fri, 16 Oct 2009, Alan Jenkins wrote: > >> So userspace is supposed to realise that "0" means "this attribute is >> not supported", as opposed to "I am a brand new battery and don't >> remember being factory-tested". >> >> How about returning -1 for batteries without _BIX? >> > > How about NOT registering attributes that don't exist? That's the proper > way of doing things in sysfs. > > That is going to be too complex (2 duplicated arrays) > When that's not possible, I'd suggest doing the right thing and returning an > error of some sort (ENXIO, ENOTSUP, etc)... > > None of power class members does it, and all ACPI classes are returning -1 in not-supporting case. Regards, Alex. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html