lkml.org 
[lkml]   [1997]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: pre-2.0.31-7 nit picks
Date
From
Michael K. Johnson wrote:
>
>
> Aaron Tiensivu writes:
> >+You can adjust these with a command such as:
> >+
> >+# echo 128 256 512 > /proc/sys/vm/freepages
> >+
> >
> >All those echo's should be:
> >
> >echo "128 256 512" > /proc/sys/vm/freepages
>
> Says who?
>
> $ echo 128 256 512 > a
> $ echo "128 256 512" > b
> $ diff a b
> $
>
> The echo command concatenates its arguments separated by spaces.

Michael, what you didn't check was wether "echo" wrote that first string
in one "write" system call, or not. If it does something like

write (1, argv[1], strlen (argv[1]);
for (i=2;i<argc;i++) {
write (1, " ", 1);
write (1, argv[i], strlen (argv[i]));
}
it becomes hard for the kernel to see the "general picture", and in
fact, what would happen is that the kernel starts parsing at the
beginning for every separate "write" call.

Anyway, I checked it, all echo's I could find on my system don't do
this. However, some people reported problems, which went away with
the quotes.

Roger.




\
 
 \ /
  Last update: 2005-03-22 13:40    [from the cache]
©2003-2011 Jasper Spaans