lkml.org 
[lkml]   [2005]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver core: Add the ability to unbind drivers to devices from userspace
On 8/7/05, Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
> > > > > Could you tell me why you don't just fail the operation if malformed
> > > > > input is supplied?
> > > >
> > > > Leading/trailing white space should be allowed. For example echo
> > > > appends '\n' unless you know to use -n. It is easier to fix the kernel
> > > > than to teach everyone to use -n.
> > >
> > > Please, NO! echo -n is the right thing to do, and users will eventually learn.
> > > We are not going to add such workarounds all over the kernel...
> >
> > It is not a work around. These are text attributes meant for human
> > use. Humans have a hard time cleaning up things they can't see. And
> > the failure mode for this is awful, your attribute won't set but
> > everything on the screen looks fine.
>
> Kernel is not a place to be user friendly. Or do you propose stripping whitespace
> for open(), too? File called "foo.txt " certainly *is* going to be confusing, but it should be allowed at kernel level.

open is not made for human use, it is used by programs and only
indirectly by humans. sysfs variables are used by directly humans.

>
> Now... echo foo > /sys/var does not properly report errors. Thats bad, but it needs to
> be fixed in bash.

It is going to take a lot more code to return an error that a
parameter didn't match because of extra white space that it would take
to simply remove the whitespace.

> --
> 64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
>
>


--
Jon Smirl
jonsmirl@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-07 22:19    [W:0.075 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site