netdev
[Top] [All Lists]

[PATCH] ATM - fix seqfile compile failure

To: netdev@xxxxxxxxxxx, shemminger@xxxxxxxx, linux-atm-general@xxxxxxxxxxxxxxxxxxxxx
Subject: [PATCH] ATM - fix seqfile compile failure
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Fri, 5 Sep 2003 18:51:13 +0100
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.25i
The recent conversion to seq_file breaks CONFIG_ATM_BR2684_IPFILTER
compile. 

I have absolutely no idea what the original author was attempting to
achieve with the "pos" thing, btw ... *shrug*

Entirely untested.

regards
john


diff -Naurp -X dontdiff linux-cvs/net/atm/br2684.c linux-fixes/net/atm/br2684.c
--- linux-cvs/net/atm/br2684.c  2003-09-05 07:06:15.000000000 +0100
+++ linux-fixes/net/atm/br2684.c        2003-09-05 18:55:15.000000000 +0100
@@ -732,8 +732,8 @@ static int br2684_seq_show(struct seq_fi
 #ifdef CONFIG_ATM_BR2684_IPFILTER
 #define b1(var, byte)  ((u8 *) &brvcc->filter.var)[byte]
 #define bs(var)                b1(var, 0), b1(var, 1), b1(var, 2), b1(var, 3)
-                       if (brvcc->filter.netmask != 0 && pos-- == 0)
-                               return sprintf(buf, "    filter=%d.%d.%d.%d/"
+                       if (brvcc->filter.netmask != 0)
+                               seq_printf(seq, "    filter=%d.%d.%d.%d/"
                                    "%d.%d.%d.%d\n", bs(prefix), bs(netmask));
 #undef bs
 #undef b1

<Prev in Thread] Current Thread [Next in Thread>