From: Marc Dionne Date: Wed, 11 Aug 2010 21:18:32 +0000 (-0400) Subject: Linux: use %pI4 if NIPQUAD is not available X-Git-Tag: openafs-stable-1_4_13~8 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b4f78265673234c13617ee589c81d13f1f6d0e29;p=packages%2Fo%2Fopenafs.git Linux: use %pI4 if NIPQUAD is not available 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 Reviewed-by: Derrick Brashear (cherry-picked from commit d4018b2673e6532543984838290ffb891b970fea) Reviewed-on: http://gerrit.openafs.org/2551 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e2e8881db7757ccac5ce3d5fc5603c40c5b47a43) Change-Id: I1bbe4f8f24f18d29fb6af98fc6e6f4707def547f Reviewed-on: http://gerrit.openafs.org/3518 Reviewed-by: Simon Wilkinson --- diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index ed9be8a38..de8da5295 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -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;