[lkml]   [2006]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: led_class: storing a value can act but return -EINVAL

    > > Well, I'd argue current behaviour is okay... can you strace it? It
    > > should accept the number (return 3) then return -EINVAL.
    > That's exactly what happens.

    And that's pretty much exactly okay.

    You got success return when you wrote "255" there, then you got
    -EINVAL when you tried to put newline there. Expected behaviour, I'd

    ...I can see it looks ugly when you do echo manually, but you simply
    should not do that.

    > Which is totally bogus, because userspace will think that the setting
    > didn't succeed. Or application authors will ignore the return value
    > assuming that it always succeeded. Or read the value back to see if it
    > succeeded. All icky, when we can well have a good return value.

    Well, they got what they deserve, that \n does not belong there. And
    they _did_ get success report -- "3" was returned. That's how unix
    works, I'd say. Educate userspace authors that adding \n is bad idea.

    Thanks for all the (sleeping) penguins.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-04-30 14:14    [W:0.042 / U:0.848 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site