Skip to contentSkip to conversation

sysctl: add proc_dobitmap

PATCH Superseded Octavian Purdila 1 participant 1 message Feb 11, 2010

Subsystems (3)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/3 sysctl: add proc_dobitmap

The new function can be used to update bitmaps via /proc. Bits can be set by writing positive values in the file and cleared by writing negative values (e.g. 0 2 will set bits 1 and 3, -0 -2 will clear them). Reading will show only the set bits.

Cc WANG Cong <[email protected]>
Cc Neil Horman <[email protected]>
Cc Eric Dumazet <[email protected]>
---
 include/linux/sysctl.h |    2 +
 kernel/sysctl.c        |   76 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+), 0 deletions(-)
include/linux/sysctl.h +2 -0
index 9f236cd..ba89bf2 100644
@@ -985,6 +985,8 @@ extern int proc_doulongvec_minmax(struct ctl_table *, int,
 				  void __user *, size_t *, loff_t *);
 extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
 				      void __user *, size_t *, loff_t *);
+extern int proc_dobitmap(struct ctl_table *, int,
+			 void __user *, size_t *, loff_t *);
 
 /*
  * Register a set of sysctl names by calling register_sysctl_table
kernel/sysctl.c +76 -0

82 lines not on this page · raw message

Signature · 1 line
1.5.6.5