linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sysctl() strategy questions
@ 2001-09-05 18:56 Tim Hockin
  0 siblings, 0 replies; only message in thread
From: Tim Hockin @ 2001-09-05 18:56 UTC (permalink / raw)
  To: Linux Kernel Mailing List

All,

I've noticed an anomaly, and am not sure which behavior is correct:

sysctl_string() stores the value it reads to table->data
sysctl_intvec() validates but does not store the value it reads

whereas

proc_intvec() does store the intvec it reads, but does not validate
proc_dostring() stores the string it read


Should sysctl_intvec() be storing the data, or should sysctl_string() NOT? 
Or is this oddness by design?

Also, what is the typical answer to a sysctl variable that is essentially
an enum?  Ideally the /proc interface can show it as a meaningful string,
but should the sysctl() interface pass the integer values (cleaner)? 
Should I toss an enum into sysctl.h ?

Tim
-- 
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-05 18:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-05 18:56 sysctl() strategy questions Tim Hockin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).