diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-11-05 17:34:02 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2009-11-12 05:04:58 -0500 |
commit | 894d2491153a9f8270dbed21175d06fde4eba6c7 (patch) | |
tree | e49698028c4a953f4b31363a0225c7fab28cffc0 /drivers/char | |
parent | c2a86a67fadd9dddc58f55ce6323c04dde59ebed (diff) |
sysctl drivers: Remove dead binary sysctl support
Now that sys_sysctl is a wrapper around /proc/sys all of
the binary sysctl support elsewhere in the tree is
dead code.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Corey Minyard <minyard@acm.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Neil Brown <neilb@suse.de>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Acked-by: Clemens Ladisch <clemens@ladisch.de> for drivers/char/hpet.c
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hpet.c | 9 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_poweroff.c | 9 | ||||
-rw-r--r-- | drivers/char/pty.c | 10 | ||||
-rw-r--r-- | drivers/char/random.c | 42 | ||||
-rw-r--r-- | drivers/char/rtc.c | 9 |
5 files changed, 12 insertions, 67 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 70a770ac0138..a05a6112240b 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -675,36 +675,33 @@ static int hpet_is_known(struct hpet_data *hdp) | |||
675 | 675 | ||
676 | static ctl_table hpet_table[] = { | 676 | static ctl_table hpet_table[] = { |
677 | { | 677 | { |
678 | .ctl_name = CTL_UNNUMBERED, | ||
679 | .procname = "max-user-freq", | 678 | .procname = "max-user-freq", |
680 | .data = &hpet_max_freq, | 679 | .data = &hpet_max_freq, |
681 | .maxlen = sizeof(int), | 680 | .maxlen = sizeof(int), |
682 | .mode = 0644, | 681 | .mode = 0644, |
683 | .proc_handler = &proc_dointvec, | 682 | .proc_handler = &proc_dointvec, |
684 | }, | 683 | }, |
685 | {.ctl_name = 0} | 684 | {} |
686 | }; | 685 | }; |
687 | 686 | ||
688 | static ctl_table hpet_root[] = { | 687 | static ctl_table hpet_root[] = { |
689 | { | 688 | { |
690 | .ctl_name = CTL_UNNUMBERED, | ||
691 | .procname = "hpet", | 689 | .procname = "hpet", |
692 | .maxlen = 0, | 690 | .maxlen = 0, |
693 | .mode = 0555, | 691 | .mode = 0555, |
694 | .child = hpet_table, | 692 | .child = hpet_table, |
695 | }, | 693 | }, |
696 | {.ctl_name = 0} | 694 | {} |
697 | }; | 695 | }; |
698 | 696 | ||
699 | static ctl_table dev_root[] = { | 697 | static ctl_table dev_root[] = { |
700 | { | 698 | { |
701 | .ctl_name = CTL_DEV, | ||
702 | .procname = "dev", | 699 | .procname = "dev", |
703 | .maxlen = 0, | 700 | .maxlen = 0, |
704 | .mode = 0555, | 701 | .mode = 0555, |
705 | .child = hpet_root, | 702 | .child = hpet_root, |
706 | }, | 703 | }, |
707 | {.ctl_name = 0} | 704 | {} |
708 | }; | 705 | }; |
709 | 706 | ||
710 | static struct ctl_table_header *sysctl_header; | 707 | static struct ctl_table_header *sysctl_header; |
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index 2e66b5f773dd..aa39722696dd 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c | |||
@@ -660,8 +660,7 @@ static struct ipmi_smi_watcher smi_watcher = { | |||
660 | #include <linux/sysctl.h> | 660 | #include <linux/sysctl.h> |
661 | 661 | ||
662 | static ctl_table ipmi_table[] = { | 662 | static ctl_table ipmi_table[] = { |
663 | { .ctl_name = DEV_IPMI_POWEROFF_POWERCYCLE, | 663 | { .procname = "poweroff_powercycle", |
664 | .procname = "poweroff_powercycle", | ||
665 | .data = &poweroff_powercycle, | 664 | .data = &poweroff_powercycle, |
666 | .maxlen = sizeof(poweroff_powercycle), | 665 | .maxlen = sizeof(poweroff_powercycle), |
667 | .mode = 0644, | 666 | .mode = 0644, |
@@ -670,16 +669,14 @@ static ctl_table ipmi_table[] = { | |||
670 | }; | 669 | }; |
671 | 670 | ||
672 | static ctl_table ipmi_dir_table[] = { | 671 | static ctl_table ipmi_dir_table[] = { |
673 | { .ctl_name = DEV_IPMI, | 672 | { .procname = "ipmi", |
674 | .procname = "ipmi", | ||
675 | .mode = 0555, | 673 | .mode = 0555, |
676 | .child = ipmi_table }, | 674 | .child = ipmi_table }, |
677 | { } | 675 | { } |
678 | }; | 676 | }; |
679 | 677 | ||
680 | static ctl_table ipmi_root_table[] = { | 678 | static ctl_table ipmi_root_table[] = { |
681 | { .ctl_name = CTL_DEV, | 679 | { .procname = "dev", |
682 | .procname = "dev", | ||
683 | .mode = 0555, | 680 | .mode = 0555, |
684 | .child = ipmi_dir_table }, | 681 | .child = ipmi_dir_table }, |
685 | { } | 682 | { } |
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 62f282e67638..d516e9ced3c2 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -431,30 +431,25 @@ static struct cdev ptmx_cdev; | |||
431 | 431 | ||
432 | static struct ctl_table pty_table[] = { | 432 | static struct ctl_table pty_table[] = { |
433 | { | 433 | { |
434 | .ctl_name = PTY_MAX, | ||
435 | .procname = "max", | 434 | .procname = "max", |
436 | .maxlen = sizeof(int), | 435 | .maxlen = sizeof(int), |
437 | .mode = 0644, | 436 | .mode = 0644, |
438 | .data = &pty_limit, | 437 | .data = &pty_limit, |
439 | .proc_handler = &proc_dointvec_minmax, | 438 | .proc_handler = &proc_dointvec_minmax, |
440 | .strategy = &sysctl_intvec, | ||
441 | .extra1 = &pty_limit_min, | 439 | .extra1 = &pty_limit_min, |
442 | .extra2 = &pty_limit_max, | 440 | .extra2 = &pty_limit_max, |
443 | }, { | 441 | }, { |
444 | .ctl_name = PTY_NR, | ||
445 | .procname = "nr", | 442 | .procname = "nr", |
446 | .maxlen = sizeof(int), | 443 | .maxlen = sizeof(int), |
447 | .mode = 0444, | 444 | .mode = 0444, |
448 | .data = &pty_count, | 445 | .data = &pty_count, |
449 | .proc_handler = &proc_dointvec, | 446 | .proc_handler = &proc_dointvec, |
450 | }, { | 447 | }, |
451 | .ctl_name = 0 | 448 | {} |
452 | } | ||
453 | }; | 449 | }; |
454 | 450 | ||
455 | static struct ctl_table pty_kern_table[] = { | 451 | static struct ctl_table pty_kern_table[] = { |
456 | { | 452 | { |
457 | .ctl_name = KERN_PTY, | ||
458 | .procname = "pty", | 453 | .procname = "pty", |
459 | .mode = 0555, | 454 | .mode = 0555, |
460 | .child = pty_table, | 455 | .child = pty_table, |
@@ -464,7 +459,6 @@ static struct ctl_table pty_kern_table[] = { | |||
464 | 459 | ||
465 | static struct ctl_table pty_root_table[] = { | 460 | static struct ctl_table pty_root_table[] = { |
466 | { | 461 | { |
467 | .ctl_name = CTL_KERN, | ||
468 | .procname = "kernel", | 462 | .procname = "kernel", |
469 | .mode = 0555, | 463 | .mode = 0555, |
470 | .child = pty_kern_table, | 464 | .child = pty_kern_table, |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 04b505e5a5e2..bcf680f9ff58 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1257,40 +1257,9 @@ static int proc_do_uuid(ctl_table *table, int write, | |||
1257 | return proc_dostring(&fake_table, write, buffer, lenp, ppos); | 1257 | return proc_dostring(&fake_table, write, buffer, lenp, ppos); |
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | static int uuid_strategy(ctl_table *table, | ||
1261 | void __user *oldval, size_t __user *oldlenp, | ||
1262 | void __user *newval, size_t newlen) | ||
1263 | { | ||
1264 | unsigned char tmp_uuid[16], *uuid; | ||
1265 | unsigned int len; | ||
1266 | |||
1267 | if (!oldval || !oldlenp) | ||
1268 | return 1; | ||
1269 | |||
1270 | uuid = table->data; | ||
1271 | if (!uuid) { | ||
1272 | uuid = tmp_uuid; | ||
1273 | uuid[8] = 0; | ||
1274 | } | ||
1275 | if (uuid[8] == 0) | ||
1276 | generate_random_uuid(uuid); | ||
1277 | |||
1278 | if (get_user(len, oldlenp)) | ||
1279 | return -EFAULT; | ||
1280 | if (len) { | ||
1281 | if (len > 16) | ||
1282 | len = 16; | ||
1283 | if (copy_to_user(oldval, uuid, len) || | ||
1284 | put_user(len, oldlenp)) | ||
1285 | return -EFAULT; | ||
1286 | } | ||
1287 | return 1; | ||
1288 | } | ||
1289 | |||
1290 | static int sysctl_poolsize = INPUT_POOL_WORDS * 32; | 1260 | static int sysctl_poolsize = INPUT_POOL_WORDS * 32; |
1291 | ctl_table random_table[] = { | 1261 | ctl_table random_table[] = { |
1292 | { | 1262 | { |
1293 | .ctl_name = RANDOM_POOLSIZE, | ||
1294 | .procname = "poolsize", | 1263 | .procname = "poolsize", |
1295 | .data = &sysctl_poolsize, | 1264 | .data = &sysctl_poolsize, |
1296 | .maxlen = sizeof(int), | 1265 | .maxlen = sizeof(int), |
@@ -1298,7 +1267,6 @@ ctl_table random_table[] = { | |||
1298 | .proc_handler = &proc_dointvec, | 1267 | .proc_handler = &proc_dointvec, |
1299 | }, | 1268 | }, |
1300 | { | 1269 | { |
1301 | .ctl_name = RANDOM_ENTROPY_COUNT, | ||
1302 | .procname = "entropy_avail", | 1270 | .procname = "entropy_avail", |
1303 | .maxlen = sizeof(int), | 1271 | .maxlen = sizeof(int), |
1304 | .mode = 0444, | 1272 | .mode = 0444, |
@@ -1306,45 +1274,37 @@ ctl_table random_table[] = { | |||
1306 | .data = &input_pool.entropy_count, | 1274 | .data = &input_pool.entropy_count, |
1307 | }, | 1275 | }, |
1308 | { | 1276 | { |
1309 | .ctl_name = RANDOM_READ_THRESH, | ||
1310 | .procname = "read_wakeup_threshold", | 1277 | .procname = "read_wakeup_threshold", |
1311 | .data = &random_read_wakeup_thresh, | 1278 | .data = &random_read_wakeup_thresh, |
1312 | .maxlen = sizeof(int), | 1279 | .maxlen = sizeof(int), |
1313 | .mode = 0644, | 1280 | .mode = 0644, |
1314 | .proc_handler = &proc_dointvec_minmax, | 1281 | .proc_handler = &proc_dointvec_minmax, |
1315 | .strategy = &sysctl_intvec, | ||
1316 | .extra1 = &min_read_thresh, | 1282 | .extra1 = &min_read_thresh, |
1317 | .extra2 = &max_read_thresh, | 1283 | .extra2 = &max_read_thresh, |
1318 | }, | 1284 | }, |
1319 | { | 1285 | { |
1320 | .ctl_name = RANDOM_WRITE_THRESH, | ||
1321 | .procname = "write_wakeup_threshold", | 1286 | .procname = "write_wakeup_threshold", |
1322 | .data = &random_write_wakeup_thresh, | 1287 | .data = &random_write_wakeup_thresh, |
1323 | .maxlen = sizeof(int), | 1288 | .maxlen = sizeof(int), |
1324 | .mode = 0644, | 1289 | .mode = 0644, |
1325 | .proc_handler = &proc_dointvec_minmax, | 1290 | .proc_handler = &proc_dointvec_minmax, |
1326 | .strategy = &sysctl_intvec, | ||
1327 | .extra1 = &min_write_thresh, | 1291 | .extra1 = &min_write_thresh, |
1328 | .extra2 = &max_write_thresh, | 1292 | .extra2 = &max_write_thresh, |
1329 | }, | 1293 | }, |
1330 | { | 1294 | { |
1331 | .ctl_name = RANDOM_BOOT_ID, | ||
1332 | .procname = "boot_id", | 1295 | .procname = "boot_id", |
1333 | .data = &sysctl_bootid, | 1296 | .data = &sysctl_bootid, |
1334 | .maxlen = 16, | 1297 | .maxlen = 16, |
1335 | .mode = 0444, | 1298 | .mode = 0444, |
1336 | .proc_handler = &proc_do_uuid, | 1299 | .proc_handler = &proc_do_uuid, |
1337 | .strategy = &uuid_strategy, | ||
1338 | }, | 1300 | }, |
1339 | { | 1301 | { |
1340 | .ctl_name = RANDOM_UUID, | ||
1341 | .procname = "uuid", | 1302 | .procname = "uuid", |
1342 | .maxlen = 16, | 1303 | .maxlen = 16, |
1343 | .mode = 0444, | 1304 | .mode = 0444, |
1344 | .proc_handler = &proc_do_uuid, | 1305 | .proc_handler = &proc_do_uuid, |
1345 | .strategy = &uuid_strategy, | ||
1346 | }, | 1306 | }, |
1347 | { .ctl_name = 0 } | 1307 | { } |
1348 | }; | 1308 | }; |
1349 | #endif /* CONFIG_SYSCTL */ | 1309 | #endif /* CONFIG_SYSCTL */ |
1350 | 1310 | ||
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index bc4ab3e54550..37bfe23c218e 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -282,34 +282,31 @@ static irqreturn_t rtc_interrupt(int irq, void *dev_id) | |||
282 | */ | 282 | */ |
283 | static ctl_table rtc_table[] = { | 283 | static ctl_table rtc_table[] = { |
284 | { | 284 | { |
285 | .ctl_name = CTL_UNNUMBERED, | ||
286 | .procname = "max-user-freq", | 285 | .procname = "max-user-freq", |
287 | .data = &rtc_max_user_freq, | 286 | .data = &rtc_max_user_freq, |
288 | .maxlen = sizeof(int), | 287 | .maxlen = sizeof(int), |
289 | .mode = 0644, | 288 | .mode = 0644, |
290 | .proc_handler = &proc_dointvec, | 289 | .proc_handler = &proc_dointvec, |
291 | }, | 290 | }, |
292 | { .ctl_name = 0 } | 291 | { } |
293 | }; | 292 | }; |
294 | 293 | ||
295 | static ctl_table rtc_root[] = { | 294 | static ctl_table rtc_root[] = { |
296 | { | 295 | { |
297 | .ctl_name = CTL_UNNUMBERED, | ||
298 | .procname = "rtc", | 296 | .procname = "rtc", |
299 | .mode = 0555, | 297 | .mode = 0555, |
300 | .child = rtc_table, | 298 | .child = rtc_table, |
301 | }, | 299 | }, |
302 | { .ctl_name = 0 } | 300 | { } |
303 | }; | 301 | }; |
304 | 302 | ||
305 | static ctl_table dev_root[] = { | 303 | static ctl_table dev_root[] = { |
306 | { | 304 | { |
307 | .ctl_name = CTL_DEV, | ||
308 | .procname = "dev", | 305 | .procname = "dev", |
309 | .mode = 0555, | 306 | .mode = 0555, |
310 | .child = rtc_root, | 307 | .child = rtc_root, |
311 | }, | 308 | }, |
312 | { .ctl_name = 0 } | 309 | { } |
313 | }; | 310 | }; |
314 | 311 | ||
315 | static struct ctl_table_header *sysctl_header; | 312 | static struct ctl_table_header *sysctl_header; |