On 7/28/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> Even simpler version
>
> --
> Jon Smirl
> [EMAIL PROTECTED]
>
> Remove leading and trailing whitespace when text sysfs attribute is set
> signed-off-by: Jon Smirl <[EMAIL PROTECTED]>
>
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> --- a
Hi!
> > > 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 t
On 8/7/05, Pavel Machek <[EMAIL PROTECTED]> 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
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
Hi!
> > > If we are going back to needing helper scripts then I should just
> > > remove the entire sysfs graphics interface and switch back to using
> > > ioctls and a helper app. Of could no one can ever find the helper app
> > > or remember how it works. I thought one of the main reasons behind
> > Stupid users are not a reason for kernel bloat.
>
> You have a very wrapped sense of kernel bloat. This is nine lines of
> code whose absence is guaranteed to generate a bunch of bug reports.
They are supposed to be present, but not in the kernel.
> Not having it is also causing various imp
On 8/5/05, Greg KH <[EMAIL PROTECTED]> wrote:
> On Fri, Jul 29, 2005 at 02:50:44PM -0400, Jon Smirl wrote:
> > Greg, is this ok for your tree now or does it need more work?
>
> It's in my queue, will add it to the tree next week. Sorry for the
> delay, was at OSCON this week...
Glad to see this.
On Fri, Jul 29, 2005 at 02:50:44PM -0400, Jon Smirl wrote:
> Greg, is this ok for your tree now or does it need more work?
It's in my queue, will add it to the tree next week. Sorry for the
delay, was at OSCON this week...
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubsc
On Tue, Jan 01, 2002 at 08:53:39AM +0100, Pavel Machek wrote:
> Hi!
>
> > > > New, simplified version of the sysfs whitespace strip patch...
> > >
> > > Could you tell me why you don't just fail the operation if malformed
> > > input is supplied?
> >
> > Leading/trailing white space should be al
On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Freitag, 5. August 2005 20:47 schrieb Jon Smirl:
> > On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > > Am Freitag, 5. August 2005 20:14 schrieb Jon Smirl:
> > > > On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > > > > Am Freita
Am Freitag, 5. August 2005 20:47 schrieb Jon Smirl:
> On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > Am Freitag, 5. August 2005 20:14 schrieb Jon Smirl:
> > > On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > > > Am Freitag, 5. August 2005 15:32 schrieb Jon Smirl:
> > > > > On 1/1/02
On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Freitag, 5. August 2005 20:14 schrieb Jon Smirl:
> > On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > > Am Freitag, 5. August 2005 15:32 schrieb Jon Smirl:
> > > > On 1/1/02, Pavel Machek <[EMAIL PROTECTED]> wrote:
> > > > > Hi!
> > >
Am Freitag, 5. August 2005 20:14 schrieb Jon Smirl:
> On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > Am Freitag, 5. August 2005 15:32 schrieb Jon Smirl:
> > > On 1/1/02, Pavel Machek <[EMAIL PROTECTED]> wrote:
> > > > Hi!
> > > >
> > > > > > > New, simplified version of the sysfs whitespac
On 8/5/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Freitag, 5. August 2005 15:32 schrieb Jon Smirl:
> > On 1/1/02, Pavel Machek <[EMAIL PROTECTED]> wrote:
> > > Hi!
> > >
> > > > > > New, simplified version of the sysfs whitespace strip patch...
> > > > >
> > > > > Could you tell me why you d
Am Freitag, 5. August 2005 15:32 schrieb Jon Smirl:
> On 1/1/02, Pavel Machek <[EMAIL PROTECTED]> wrote:
> > Hi!
> >
> > > > > New, simplified version of the sysfs whitespace strip patch...
> > > >
> > > > Could you tell me why you don't just fail the operation if malformed
> > > > input is suppli
On 1/1/02, Pavel Machek <[EMAIL PROTECTED]> wrote:
> Hi!
>
> > > > New, simplified version of the sysfs whitespace strip patch...
> > >
> > > 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 ex
Hi!
> > > New, simplified version of the sysfs whitespace strip patch...
> >
> > 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
Greg, is this ok for your tree now or does it need more work?
On 7/28/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> Even simpler version
>
> --
> Jon Smirl
> [EMAIL PROTECTED]
>
> Remove leading and trailing whitespace when text sysfs attribute is set
> signed-off-by: Jon Smirl <[EMAIL PROTECTE
Am Donnerstag, 28. Juli 2005 21:57 schrieb Jon Smirl:
> New, simplified version of the sysfs whitespace strip patch...
Could you tell me why you don't just fail the operation if malformed
input is supplied?
Regards
Oliver
-
To unsubscribe from this list: send the line "uns
Am Donnerstag, 28. Juli 2005 23:12 schrieb Jon Smirl:
> On 7/28/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > Am Donnerstag, 28. Juli 2005 21:57 schrieb Jon Smirl:
> > > New, simplified version of the sysfs whitespace strip patch...
> >
> > Could you tell me why you don't just fail the operatio
On 7/28/05, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Donnerstag, 28. Juli 2005 21:57 schrieb Jon Smirl:
> > New, simplified version of the sysfs whitespace strip patch...
>
> Could you tell me why you don't just fail the operation if malformed
> input is supplied?
Leading/trailing white spac
Still one nitpick:
Jon Smirl wrote:
> + while (isspace(*x) && (x - buffer->page < count))
> + x++;
I think you can just do:
if (count > 0)
while (isspace(*x))
x++;
If the passed-in string was fully whitespace then the trailing-whit
Even simpler version
--
Jon Smirl
[EMAIL PROTECTED]
Remove leading and trailing whitespace when text sysfs attribute is set
signed-off-by: Jon Smirl <[EMAIL PROTECTED]>
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -6,6 +6,7 @@
#include
#in
New, simplified version of the sysfs whitespace strip patch...
--
Jon Smirl
[EMAIL PROTECTED]
Remove leading and trailing whitespace when text sysfs attribute is set
signed-off-by: Jon Smirl <[EMAIL PROTECTED]>
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/
On Thu, Jul 28, 2005 at 08:54:53AM -0400, Jon Smirl wrote:
> On 7/28/05, Mitchell Blank Jr <[EMAIL PROTECTED]> wrote:
> > Greg KH wrote:
> > > > + /* locate trailng white space */
> > > > + z = y = x;
> > > > + while (y - buffer->page < count) {
> > > > + y++;
> > > > + z
Jon Smirl wrote:
> Do we need to deal with UTF8 here? I did the forward loop because you
> can't parse UTF8 backwards. If UTF8 is possible I need to change the
> pointer inc function.
As others have mentioned there shouldn't be a UTF8 problem with isspace().
However, even if you wanted to scan goi
Jon Smirl wrote:
On 7/28/05, Mitchell Blank Jr <[EMAIL PROTECTED]> wrote:
[...]
It looks sane-ish to me, but also more complicated than need be. Why can't
you just do something like:
while (count > 0 && isspace(x[count - 1]))
count--;
Do we need to deal with UTF8 here?
Am Donnerstag, 28. Juli 2005 14:54 schrieb Jon Smirl:
> On 7/28/05, Mitchell Blank Jr <[EMAIL PROTECTED]> wrote:
> > Greg KH wrote:
> > > > + /* locate trailng white space */
> > > > + z = y = x;
> > > > + while (y - buffer->page < count) {
> > > > + y++;
> > > > + z = y;
On 7/28/05, Mitchell Blank Jr <[EMAIL PROTECTED]> wrote:
> Greg KH wrote:
> > > + /* locate trailng white space */
> > > + z = y = x;
> > > + while (y - buffer->page < count) {
> > > + y++;
> > > + z = y;
> > > + while (isspace(*y) && (y - buffer->page < count))
On 7/28/05, Greg KH <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 28, 2005 at 12:49:21AM -0400, Jon Smirl wrote:
> > @@ -207,6 +208,28 @@ flush_write_buffer(struct dentry * dentr
> > struct attribute * attr = to_attr(dentry);
> > struct kobject * kobj = to_kobj(dentry->d_parent);
> > s
Greg KH wrote:
> > + /* locate trailng white space */
> > + z = y = x;
> > + while (y - buffer->page < count) {
> > + y++;
> > + z = y;
> > + while (isspace(*y) && (y - buffer->page < count)) {
> > + y++;
> > + }
> > + }
> > + coun
On Thu, Jul 28, 2005 at 12:49:21AM -0400, Jon Smirl wrote:
> @@ -207,6 +208,28 @@ flush_write_buffer(struct dentry * dentr
> struct attribute * attr = to_attr(dentry);
> struct kobject * kobj = to_kobj(dentry->d_parent);
> struct sysfs_ops * ops = buffer->ops;
> + char *x, *y,
Change log and signed off
--
Jon Smirl
[EMAIL PROTECTED]
Remove leading and trailing whitespace when text sysfs attributes are
assigned a value.
Signed-off-by: Jon Smirl <[EMAIL PROTECTED]>
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -6,6 +6,7
On Wed, Jul 27, 2005 at 11:59:11PM -0400, Jon Smirl wrote:
> New patch with fixed whitespace.
But no changelog info or signed-off-by line :(
Care to try it again?
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTEC
New patch with fixed whitespace.
--
Jon Smirl
[EMAIL PROTECTED]
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -6,6 +6,7 @@
#include
#include
#include
+#include
#include
#include
@@ -207,6 +208,28 @@ flush_write_buffer(struct dentry *
On Wed, Jul 27, 2005 at 10:05:34PM -0400, Jon Smirl wrote:
> Any comments on this? I'll fix up the whitespace issues if everyone
> agrees that the code works.
I'll add the patch to my tree and -mm if you clean up the whitespace
issues :)
thanks,
greg k-h
-
To unsubscribe from this list: send the
Any comments on this? I'll fix up the whitespace issues if everyone
agrees that the code works.
This patch will break all of the fbdev attributes since I was making
wrong assumptions. I have another patch ready to fix them after this
one goes in.
On 7/25/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
>
On Monday 25 July 2005 22:15, Jon Smirl wrote:
> + while( isspace(*x) && (x - buffer->page < count))
> + x++;
> +
> + /* locate trailng white space */
> + z = y = x;
> + while (y - buffer->page < count) {
> + y++;
> + z = y;
> + while(
On 7/25/05, Greg KH <[EMAIL PROTECTED]> wrote:
> > I'll put one together to trim leading/trailing white space from the
> > buffer before it is passed into the attribute functions. Now that I
> > think about this I believe the attributes should have always had the
> > leading/trailing white space re
On Mon, Jul 25, 2005 at 08:56:17PM -0400, Jon Smirl wrote:
> On 7/25/05, Greg KH <[EMAIL PROTECTED]> wrote:
> > On Mon, Jul 25, 2005 at 08:28:10PM -0400, Jon Smirl wrote:
> > > I didn't realize that echo was adding the CR, I thought that it always
> > > appeared on the end of a sysfs attribute set.
On 7/25/05, Greg KH <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 25, 2005 at 08:28:10PM -0400, Jon Smirl wrote:
> > I didn't realize that echo was adding the CR, I thought that it always
> > appeared on the end of a sysfs attribute set. So now I have to go add
> > white space stripping to a dozen fbdev
On Mon, Jul 25, 2005 at 08:28:10PM -0400, Jon Smirl wrote:
> On 7/25/05, Greg KH <[EMAIL PROTECTED]> wrote:
> > On Mon, Jul 25, 2005 at 12:30:43PM -0400, Jon Smirl wrote:
> > > On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > > > On 7/25/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> > > > >
On 7/25/05, Greg KH <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 25, 2005 at 12:30:43PM -0400, Jon Smirl wrote:
> > On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > > On 7/25/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> > > > On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > > > > On S
On Mon, Jul 25, 2005 at 12:30:43PM -0400, Jon Smirl wrote:
> On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > On 7/25/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> > > On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > > > On Sunday 24 July 2005 23:09, Jon Smirl wrote:
> > > > > I ju
On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> On 7/25/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> > On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > > On Sunday 24 July 2005 23:09, Jon Smirl wrote:
> > > > I just pulled from GIT to test bind/unbind. I couldn't get it to work;
>
On 7/25/05, Jon Smirl <[EMAIL PROTECTED]> wrote:
> On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> > On Sunday 24 July 2005 23:09, Jon Smirl wrote:
> > > I just pulled from GIT to test bind/unbind. I couldn't get it to work;
> > > it isn't taking into account the CR on the end of the input
On 7/25/05, Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> On Sunday 24 July 2005 23:09, Jon Smirl wrote:
> > I just pulled from GIT to test bind/unbind. I couldn't get it to work;
> > it isn't taking into account the CR on the end of the input value of
> > the sysfs attribute. This patch will fix i
On Sunday 24 July 2005 23:09, Jon Smirl wrote:
> I just pulled from GIT to test bind/unbind. I couldn't get it to work;
> it isn't taking into account the CR on the end of the input value of
> the sysfs attribute. This patch will fix it but I'm sure there is a
> cleaner solution.
>
"echo -n" sho
I just pulled from GIT to test bind/unbind. I couldn't get it to work;
it isn't taking into account the CR on the end of the input value of
the sysfs attribute. This patch will fix it but I'm sure there is a
cleaner solution.
--
Jon Smirl
[EMAIL PROTECTED]
diff --git a/drivers/base/bus.c b/dri
49 matches
Mail list logo