OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 219... | Line 219... | |||
219 | /* create /proc/irq */ |
219 | /* create /proc/irq */ |
|
220 | root_irq_dir = proc_mkdir("irq", NULL); |
220 | root_irq_dir = proc_mkdir("irq", NULL); |
|
221 | if (!root_irq_dir) |
221 | if (!root_irq_dir) |
|
222 | --- a/kernel/time/timer_list.c |
222 | --- a/kernel/time/timer_list.c |
|
223 | +++ b/kernel/time/timer_list.c |
223 | +++ b/kernel/time/timer_list.c |
|
224 | @@ -399,6 +399,9 @@ static int __init init_timer_list_procfs |
224 | @@ -399,6 +399,8 @@ static int __init init_timer_list_procfs |
|
225 | { |
225 | { |
|
226 | struct proc_dir_entry *pe; |
226 | struct proc_dir_entry *pe; |
|
Line 227... | Line 227... | |||
227 | |
227 | |
|
228 | + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) |
228 | + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) |
|
229 | + return 0; |
- | ||
230 | + |
229 | + return 0; |
|
231 | pe = proc_create("timer_list", 0400, NULL, &timer_list_fops); |
230 | pe = proc_create("timer_list", 0444, NULL, &timer_list_fops); |
|
232 | if (!pe) |
231 | if (!pe) |
|
233 | return -ENOMEM; |
232 | return -ENOMEM; |
|
234 | --- a/mm/vmalloc.c |
233 | --- a/mm/vmalloc.c |
|
235 | +++ b/mm/vmalloc.c |
234 | +++ b/mm/vmalloc.c |
|
Line 242... | Line 241... | |||
242 | proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); |
241 | proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); |
|
243 | return 0; |
242 | return 0; |
|
244 | } |
243 | } |
|
245 | --- a/mm/vmstat.c |
244 | --- a/mm/vmstat.c |
|
246 | +++ b/mm/vmstat.c |
245 | +++ b/mm/vmstat.c |
|
247 | @@ -1798,10 +1798,12 @@ static int __init setup_vmstat(void) |
246 | @@ -1796,10 +1796,12 @@ static int __init setup_vmstat(void) |
|
248 | cpu_notifier_register_done(); |
247 | cpu_notifier_register_done(); |
|
249 | #endif |
248 | #endif |
|
250 | #ifdef CONFIG_PROC_FS |
249 | #ifdef CONFIG_PROC_FS |
|
251 | - proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); |
250 | - proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); |
|
252 | - proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops); |
251 | - proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops); |
|
Line 326... | Line 325... | |||
326 | remove_proc_entry("dev", net->proc_net); |
325 | remove_proc_entry("dev", net->proc_net); |
|
327 | } |
326 | } |
|
Line 328... | Line 327... | |||
328 | |
327 | |
|
329 | --- a/net/core/sock.c |
328 | --- a/net/core/sock.c |
|
330 | +++ b/net/core/sock.c |
329 | +++ b/net/core/sock.c |
|
Line 331... | Line 330... | |||
331 | @@ -3088,6 +3088,8 @@ static __net_initdata struct pernet_oper |
330 | @@ -3084,6 +3084,8 @@ static __net_initdata struct pernet_oper |
|
332 | |
331 | |
|
333 | static int __init proto_init(void) |
332 | static int __init proto_init(void) |
|
334 | { |
333 | { |
|
335 | + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) |
334 | + if (IS_ENABLED(CONFIG_PROC_STRIPPED)) |
|
336 | + return 0; |
335 | + return 0; |
|
Line 337... | Line 336... | |||
337 | return register_pernet_subsys(&proto_net_ops); |
336 | return register_pernet_subsys(&proto_net_ops); |
|
338 | } |
337 | } |
|
339 | |
338 | |
|
Line 340... | Line 339... | |||
340 | --- a/net/ipv4/fib_trie.c |
339 | --- a/net/ipv4/fib_trie.c |
|
341 | +++ b/net/ipv4/fib_trie.c |
340 | +++ b/net/ipv4/fib_trie.c |
|
342 | @@ -2677,10 +2677,12 @@ static const struct file_operations fib_ |
341 | @@ -2667,10 +2667,12 @@ static const struct file_operations fib_ |
|
343 | |
342 | |
|
Line 352... | Line 351... | |||
352 | + if (!IS_ENABLED(CONFIG_PROC_STRIPPED) && |
351 | + if (!IS_ENABLED(CONFIG_PROC_STRIPPED) && |
|
353 | + !proc_create("fib_triestat", S_IRUGO, net->proc_net, |
352 | + !proc_create("fib_triestat", S_IRUGO, net->proc_net, |
|
354 | &fib_triestat_fops)) |
353 | &fib_triestat_fops)) |
|
355 | goto out2; |
354 | goto out2; |
|
Line 356... | Line 355... | |||
356 | |
355 | |
|
357 | @@ -2690,17 +2692,21 @@ int __net_init fib_proc_init(struct net |
356 | @@ -2680,17 +2682,21 @@ int __net_init fib_proc_init(struct net |
|
Line 358... | Line 357... | |||
358 | return 0; |
357 | return 0; |
|
359 | |
358 | |
|
360 | out3: |
359 | out3: |
|
Line 380... | Line 379... | |||
380 | remove_proc_entry("route", net->proc_net); |
379 | remove_proc_entry("route", net->proc_net); |
|
381 | } |
380 | } |
|
Line 382... | Line 381... | |||
382 | |
381 | |
|
383 | --- a/net/ipv4/proc.c |
382 | --- a/net/ipv4/proc.c |
|
384 | +++ b/net/ipv4/proc.c |
383 | +++ b/net/ipv4/proc.c |
|
Line 385... | Line 384... | |||
385 | @@ -565,6 +565,9 @@ static __net_initdata struct pernet_oper |
384 | @@ -564,6 +564,9 @@ static __net_initdata struct pernet_oper |
|
386 | |
385 | |
|
387 | int __init ip_misc_proc_init(void) |
386 | int __init ip_misc_proc_init(void) |
|
388 | { |
387 | { |