lkml.org 
[lkml]   [2001]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsysctl() strategy questions
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
-
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: 2005-03-22 13:02    [W:0.028 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site