Balbir Singh wrote: > echo adds a "\n" to the end of a string. When this string is copied from > user space, we need to remove it, so that match_token() can parse > the user space string correctly > > Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> > --- > > kernel/res_group/rgcs.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff -puN kernel/res_group/rgcs.c~container-res-groups-fix-parsing > kernel/res_group/rgcs.c > --- linux-2.6.19-rc2/kernel/res_group/rgcs.c~container-res-groups-fix-parsing > 2006-11-09 23:08:10.000000000 +0530 > +++ linux-2.6.19-rc2-balbir/kernel/res_group/rgcs.c 2006-11-09 > 23:08:10.000000000 +0530 > @@ -241,6 +241,12 @@ ssize_t res_group_file_write(struct cont > } > buf[nbytes] = 0; /* nul-terminate */ > > + /* > + * Ignore "\n". It might come in from echo(1)
Why not inform user he should call echo -n? > + */ > + if (buf[nbytes - 1] == '\n') > + buf[nbytes - 1] = 0; > + > container_manage_lock(); > > if (container_is_removed(cont)) { > _ > That's the same patch as in [PATCH 1/8] mail. Did you attached a wrong one? ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ ckrm-tech mailing list https://lists.sourceforge.net/lists/listinfo/ckrm-tech