Hi!
> When I store something into the brightness sysfs attribute of an LED, it
> will accept the value but return -EINVAL:
>
> johannes:/sys/class/leds/pmu-front-led# echo 255 > brightness
> bash: echo: write error: Invalid argument
>
> (yet the LED turns on)
>
> This happens because the store callback doesn't consume all the input.
Well, I'd argue current behaviour is okay... can you strace it? It
should accept the number (return 3) then return -EINVAL.
> There are two possible ways to handle this:
> a) accept anything that begins with a valid number.
> b) reject anything that isn't *only* a number
c) accept anything that is number, ignore newlines.
a) is just way too ugly...
Pavel
--
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]