sysctl.c (0195c00244dc2e9f522475868fa278c473ba7339) | sysctl.c (5a04cca6c39cdd0b8c75b0628da634248f381b62) |
---|---|
1/* 2 * sysctl.c: General linux system control interface 3 * 4 * Begun 24 March 1995, Stephen Tweedie 5 * Added /proc support, Dec 1995 6 * Added bdflush entry and intvec min/max checking, 2/23/96, Tom Dyas. 7 * Added hooks for /proc/sys/net (minor, minor patch), 96/4/1, Mike Shaver. 8 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver. --- 9 unchanged lines hidden (view full) --- 18 * Removed it and replaced it with older style, 03/23/00, Bill Wendling 19 */ 20 21#include <linux/module.h> 22#include <linux/mm.h> 23#include <linux/swap.h> 24#include <linux/slab.h> 25#include <linux/sysctl.h> | 1/* 2 * sysctl.c: General linux system control interface 3 * 4 * Begun 24 March 1995, Stephen Tweedie 5 * Added /proc support, Dec 1995 6 * Added bdflush entry and intvec min/max checking, 2/23/96, Tom Dyas. 7 * Added hooks for /proc/sys/net (minor, minor patch), 96/4/1, Mike Shaver. 8 * Added kernel/java-{interpreter,appletviewer}, 96/5/10, Mike Shaver. --- 9 unchanged lines hidden (view full) --- 18 * Removed it and replaced it with older style, 03/23/00, Bill Wendling 19 */ 20 21#include <linux/module.h> 22#include <linux/mm.h> 23#include <linux/swap.h> 24#include <linux/slab.h> 25#include <linux/sysctl.h> |
26#include <linux/bitmap.h> |
|
26#include <linux/signal.h> 27#include <linux/printk.h> 28#include <linux/proc_fs.h> 29#include <linux/security.h> 30#include <linux/ctype.h> 31#include <linux/kmemcheck.h> 32#include <linux/fs.h> 33#include <linux/init.h> --- 29 unchanged lines hidden (view full) --- 63#include <asm/uaccess.h> 64#include <asm/processor.h> 65 66#ifdef CONFIG_X86 67#include <asm/nmi.h> 68#include <asm/stacktrace.h> 69#include <asm/io.h> 70#endif | 27#include <linux/signal.h> 28#include <linux/printk.h> 29#include <linux/proc_fs.h> 30#include <linux/security.h> 31#include <linux/ctype.h> 32#include <linux/kmemcheck.h> 33#include <linux/fs.h> 34#include <linux/init.h> --- 29 unchanged lines hidden (view full) --- 64#include <asm/uaccess.h> 65#include <asm/processor.h> 66 67#ifdef CONFIG_X86 68#include <asm/nmi.h> 69#include <asm/stacktrace.h> 70#include <asm/io.h> 71#endif |
71#ifdef CONFIG_SPARC 72#include <asm/setup.h> 73#endif | |
74#ifdef CONFIG_BSD_PROCESS_ACCT 75#include <linux/acct.h> 76#endif 77#ifdef CONFIG_RT_MUTEXES 78#include <linux/rtmutex.h> 79#endif 80#if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT) 81#include <linux/lockdep.h> --- 58 unchanged lines hidden (view full) --- 140 141static int ngroups_max = NGROUPS_MAX; 142static const int cap_last_cap = CAP_LAST_CAP; 143 144#ifdef CONFIG_INOTIFY_USER 145#include <linux/inotify.h> 146#endif 147#ifdef CONFIG_SPARC | 72#ifdef CONFIG_BSD_PROCESS_ACCT 73#include <linux/acct.h> 74#endif 75#ifdef CONFIG_RT_MUTEXES 76#include <linux/rtmutex.h> 77#endif 78#if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_LOCK_STAT) 79#include <linux/lockdep.h> --- 58 unchanged lines hidden (view full) --- 138 139static int ngroups_max = NGROUPS_MAX; 140static const int cap_last_cap = CAP_LAST_CAP; 141 142#ifdef CONFIG_INOTIFY_USER 143#include <linux/inotify.h> 144#endif 145#ifdef CONFIG_SPARC |
146#include <asm/system.h> |
|
148#endif 149 150#ifdef CONFIG_SPARC64 151extern int sysctl_tsb_ratio; 152#endif 153 154#ifdef __hppa__ 155extern int pwrsw_enabled; --- 2234 unchanged lines hidden (view full) --- 2390 break; 2391 } 2392 if (left) { 2393 kbuf++; 2394 left--; 2395 } 2396 } 2397 | 147#endif 148 149#ifdef CONFIG_SPARC64 150extern int sysctl_tsb_ratio; 151#endif 152 153#ifdef __hppa__ 154extern int pwrsw_enabled; --- 2234 unchanged lines hidden (view full) --- 2389 break; 2390 } 2391 if (left) { 2392 kbuf++; 2393 left--; 2394 } 2395 } 2396 |
2398 while (val_a <= val_b) 2399 set_bit(val_a++, tmp_bitmap); 2400 | 2397 bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1); |
2401 first = 0; 2402 proc_skip_char(&kbuf, &left, '\n'); 2403 } 2404 free_page(page); 2405 } else { 2406 unsigned long bit_a, bit_b = 0; 2407 2408 while (left) { --- 26 unchanged lines hidden (view full) --- 2435 err = proc_put_char(&buffer, &left, '\n'); 2436 } 2437 2438 if (!err) { 2439 if (write) { 2440 if (*ppos) 2441 bitmap_or(bitmap, bitmap, tmp_bitmap, bitmap_len); 2442 else | 2398 first = 0; 2399 proc_skip_char(&kbuf, &left, '\n'); 2400 } 2401 free_page(page); 2402 } else { 2403 unsigned long bit_a, bit_b = 0; 2404 2405 while (left) { --- 26 unchanged lines hidden (view full) --- 2432 err = proc_put_char(&buffer, &left, '\n'); 2433 } 2434 2435 if (!err) { 2436 if (write) { 2437 if (*ppos) 2438 bitmap_or(bitmap, bitmap, tmp_bitmap, bitmap_len); 2439 else |
2443 memcpy(bitmap, tmp_bitmap, 2444 BITS_TO_LONGS(bitmap_len) * sizeof(unsigned long)); | 2440 bitmap_copy(bitmap, tmp_bitmap, bitmap_len); |
2445 } 2446 kfree(tmp_bitmap); 2447 *lenp -= left; 2448 *ppos += *lenp; 2449 return 0; 2450 } else { 2451 kfree(tmp_bitmap); 2452 return err; --- 69 unchanged lines hidden --- | 2441 } 2442 kfree(tmp_bitmap); 2443 *lenp -= left; 2444 *ppos += *lenp; 2445 return 0; 2446 } else { 2447 kfree(tmp_bitmap); 2448 return err; --- 69 unchanged lines hidden --- |