On Sun, Feb 18, 2018 at 8:48 PM, Ulf Magnusson <ulfali...@gmail.com> wrote:
> On Fri, Feb 16, 2018 at 11:17:52AM -0800, Linus Torvalds wrote:
>> Can we *please* make "shell-stdout" go away, and make this just be "shell"?
>> The rule would be very simple:
>> - if the result of the shell command is a failure, the result is 'n'
>> - otherwise, the result is the first line of stdout
>> - if the result is empty, we replace it with 'y'.
> Could there be cases where you'd legitimately want to put empty output
> from a command in a string (that would be common enough to matter)?
> That'd get messier with the above rule, as it never generates an empty
> string as output.
Hmm. Maybe. Something like "LOCALVERSION_AUTO" might want that where
you add a version string if something is true, and maybe you'd use a
shell script for it and generate it at Kconfig time.
I'm not seeing anything like that right now, but I could imagine it in
theory, so your worry is valid.
> Would you still be as opposed (or more opposed...) to having two
> functions if they were called something like 'success' and 'stdout'
Maybe the naming is indeed what annoyed me the most.
I do like your "success"/"stdout" more than "shell"/"shell-stdout",
because with that naming I don't get the feeling that one should
subsume the other.