Skip to content

Commit 2a2c579

Browse files
committed
Add required const to proc_handler prototypes for sysfs.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
1 parent 5612f23 commit 2a2c579

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

ipt_NETFLOW.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ static int switch_promisc(int newpromisc)
15251525

15261526
#ifdef CONFIG_SYSCTL
15271527
/* sysctl /proc/sys/net/netflow */
1528-
static int hsize_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1528+
static int hsize_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
15291529
void __user *buffer, size_t *lenp, loff_t *fpos)
15301530
{
15311531
int ret, hsize;
@@ -1542,7 +1542,7 @@ static int hsize_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp
15421542
return ret;
15431543
}
15441544

1545-
static int sndbuf_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1545+
static int sndbuf_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
15461546
void __user *buffer, size_t *lenp, loff_t *fpos)
15471547
{
15481548
int ret;
@@ -1577,7 +1577,7 @@ static int sndbuf_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *fil
15771577
}
15781578

15791579
static void free_templates(void);
1580-
static int destination_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1580+
static int destination_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
15811581
void __user *buffer, size_t *lenp, loff_t *fpos)
15821582
{
15831583
int ret;
@@ -1594,7 +1594,7 @@ static int destination_procctl(ctl_table *ctl, int write, BEFORE2632(struct file
15941594
}
15951595

15961596
#ifdef ENABLE_AGGR
1597-
static int aggregation_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1597+
static int aggregation_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
15981598
void __user *buffer, size_t *lenp, loff_t *fpos)
15991599
{
16001600
int ret;
@@ -1609,7 +1609,7 @@ static int aggregation_procctl(ctl_table *ctl, int write, BEFORE2632(struct file
16091609
#endif
16101610

16111611
#ifdef ENABLE_PROMISC
1612-
static int promisc_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1612+
static int promisc_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
16131613
void __user *buffer, size_t *lenp, loff_t *fpos)
16141614
{
16151615
int newpromisc = promisc;
@@ -1626,7 +1626,7 @@ static int promisc_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *fi
16261626

16271627
#ifdef ENABLE_SAMPLER
16281628
static int parse_sampler(char *ptr);
1629-
static int sampler_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1629+
static int sampler_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
16301630
void __user *buffer, size_t *lenp, loff_t *fpos)
16311631
{
16321632
int ret;
@@ -1659,7 +1659,7 @@ static int sampler_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *fi
16591659

16601660
#ifdef SNMP_RULES
16611661
static int add_snmp_rules(char *ptr);
1662-
static int snmp_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1662+
static int snmp_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
16631663
void __user *buffer, size_t *lenp, loff_t *fpos)
16641664
{
16651665
int ret;
@@ -1684,7 +1684,7 @@ static void clear_ipt_netflow_stat(void)
16841684
}
16851685
}
16861686

1687-
static int flush_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1687+
static int flush_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
16881688
void __user *buffer, size_t *lenp, loff_t *fpos)
16891689
{
16901690
int ret;
@@ -1713,7 +1713,7 @@ static int flush_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp
17131713
return ret;
17141714
}
17151715

1716-
static int protocol_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1716+
static int protocol_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
17171717
void __user *buffer, size_t *lenp, loff_t *fpos)
17181718
{
17191719
int ret;
@@ -1746,7 +1746,7 @@ static int protocol_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *f
17461746
#ifdef CONFIG_NF_NAT_NEEDED
17471747
static void register_ct_events(void);
17481748
static void unregister_ct_events(void);
1749-
static int natevents_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
1749+
static int natevents_procctl(const ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
17501750
void __user *buffer, size_t *lenp, loff_t *fpos)
17511751
{
17521752
int ret;
@@ -1772,7 +1772,7 @@ static struct ctl_table_header *netflow_sysctl_header;
17721772

17731773
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
17741774
#define _CTL_NAME(x) .ctl_name = x,
1775-
static void ctl_table_renumber(ctl_table *table)
1775+
static void ctl_table_renumber(const ctl_table *table)
17761776
{
17771777
int c;
17781778

0 commit comments

Comments
 (0)