lkml.org 
[lkml]   [2006]   [Nov]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 5 Nov 2006 13:34:21 -0800
FromPaul Jackson <>
SubjectRe: [ckrm-tech] [PATCH 6/6] Resource Groups over generic containers
Balbir wrote:
> This should be kmalloc(nbytes), an echo ".." has a "\n" associated
> with it.

But a:
  write(1, "..", 2);
does not have a trialing newline.

If some consumer of this kernel buffer copy of what the
user wrote cannot handle the possible trailing whitespace,
they will have to chomp (Perl phrase) it off.  You can't
just whack one byte blindly.

At least for the kernel/cpuset.c code, from whence this
came, the consumers of this kernel buffer copy are such
routines as simple_strtoul() and cpulist_parse(), both
of which cope with trailing newlines.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401
-
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: 2006-11-05 21:37    [from the cache]
©2003-2008