tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gets in the kernel



On Wed, Jun 08, 2016 at 12:52:33PM +0200, Maxime Villard wrote:
 > Le 07/06/2016 ? 18:04, Christos Zoulas a ?crit :
 > >On Jun 7,  3:20pm, dholland-tech%netbsd.org@localhost (David Holland) wrote:
 > >-- Subject: Re: gets in the kernel
 > >
 > >| On Tue, Jun 07, 2016 at 12:36:54PM +0200, Maxime Villard wrote:
 > >|  > >I noticed that gets_s (a bounded version of gets) was added in the kernel.
 > >|  > >While this iis nice, it conflicts with the c-11 "Annex K" which has a
 > >|  > >different prototype (takes rsize_t instead of size_t). Perhaps we should
 > >|  > >rename this to kgets() or getl() now before it causes problems.
 > >|  >
 > >|  > This is not in the kernel, this is in the bootloader. So you can
 > >|  > forget kgets.  I don't think we need to rename it; it remains close
 > >|  > to what some people may be used to seeing, and does differ that
 > >|  > much.
 > >|
 > >| How about not giving people the false impression it's part of Annex K?
 > 
 > libsa is just made of many libc-like functions. getl and
 > bounded_gets are not close to anything in userland. gets_s is, even
 > though it is in annex K.

It's more important not to let anyone take away the false impression
that we're supporting annex K. Otherwise that could be a significant
impediment to getting it removed.

Anyway I'm not sure why you're so strenuously objecting to changing
the name; it's like you think we're criticizing you or something
rather than just polishing... :-/

I'm going to change it to gets2() unless anyone else has better ideas
soon.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index