]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: use %pI4 if NIPQUAD is not available
authorMarc Dionne <marc.c.dionne@gmail.com>
Wed, 11 Aug 2010 21:18:32 +0000 (17:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 14 Dec 2010 18:16:22 +0000 (10:16 -0800)
The definition of NIPQUAD has been removed from the kernel headers
in the mainline kernel.  Replace it by using the %pI4 format
specifier which takes the IP address as a single argument.

There should be no change in the output.

This fix is required for 2.6.36.

Reviewed-on: http://gerrit.openafs.org/2542
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit d4018b2673e6532543984838290ffb891b970fea)

Reviewed-on: http://gerrit.openafs.org/2551
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e2e8881db7757ccac5ce3d5fc5603c40c5b47a43)
Change-Id: I1bbe4f8f24f18d29fb6af98fc6e6f4707def547f
Reviewed-on: http://gerrit.openafs.org/3518
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
src/afs/LINUX/osi_module.c

index ed9be8a38e0fce993ee0f77870ef56d1ff21fd2e..de8da5295f3a725a91492e88d81410447c43e1e0 100644 (file)
@@ -134,8 +134,12 @@ static int c_show(struct seq_file *m, void *p)
                if (!tc->cellHosts[j]) break;
 
                addr = tc->cellHosts[j]->addr->sa_ip;
+#if defined(NIPQUAD)
                seq_printf(m, "%u.%u.%u.%u #%u.%u.%u.%u\n",
                           NIPQUAD(addr), NIPQUAD(addr));
+#else
+               seq_printf(m, "%pI4 #%pI4\n", &addr, &addr);
+#endif
        }
 
        return 0;