Re: pre-2.0.31-7 nit picks

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 20 Aug 1997 07:23:30 +0200 (MET DST)


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.