Linux NFS development
 help / color / mirror / Atom feed
From: Frank Filz <ffilzlnx@us.ibm.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: NFS List <linux-nfs@vger.kernel.org>,
	Steve Dickson <SteveD@redhat.com>,
	libtirpc <libtirpc-devel@lists.sourceforge.net>
Subject: [PATCH] rpcbind: Change prognum, versnum, minvers, and maxvers in progping to rpcprog_t and rpcvers_t from u_long
Date: Wed, 22 Apr 2009 15:36:40 -0700	[thread overview]
Message-ID: <1240439800.2246.24.camel@dyn9047022153> (raw)
In-Reply-To: <D9F240D4-2B18-4A32-8B86-926727368F13@oracle.com>

On Wed, 2009-04-22 at 18:08 -0400, Chuck Lever wrote:
> I take that back.  Replacing u_long with rpcvers_t will work in both  
> cases.  glibc's CLNT_CONTROL expects a u_long here, but TI-RPC expects  
> an u_int32_t.  These match the typedef for rpcvers_t for each of these.
> 
> So, you have to make sure you are building with the headers that go  
> with your RPC library.  The headers in /usr/include/rpc go with glibc,  
> and the headers in /usr/include/tirpc/rpc go with libtirpc.

Ok, here's a patch that implements it that way. It works fine on PPC64.

This fixes a problem where "rpcinfo -T transport host prognum" fails on a PPC64
because CLNT_CONTROL expects the version number to be a 32 bit quantity. u_long
probably works fine on little endian machines, but won't work on big endian
machines.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
---
 src/rpcinfo.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/rpcinfo.c b/src/rpcinfo.c
index 0170f65..c9f51cf 100644
--- a/src/rpcinfo.c
+++ b/src/rpcinfo.c
@@ -1591,7 +1591,8 @@ progping (netid, argc, argv)
   CLIENT *client;
   struct timeval to;
   enum clnt_stat rpc_stat;
-  u_long prognum, versnum, minvers, maxvers;
+  rpcprog_t prognum;
+  rpcvers_t versnum, minvers, maxvers;
   struct rpc_err rpcerr;
   int failure = 0;
   struct netconfig *nconf;
-- 
1.5.2.2




  reply	other threads:[~2009-04-22 22:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 21:45 [PATCH] Change prognum, versnum, minvers, and maxvers in progping to u_int32_t from u_long Frank Filz
2009-04-22 21:46 ` Chuck Lever
2009-04-22 22:19   ` Frank Filz
2009-04-22 21:56 ` Chuck Lever
2009-04-22 22:08   ` [Libtirpc-devel] " Chuck Lever
2009-04-22 22:36     ` Frank Filz [this message]
2009-04-22 22:37       ` [PATCH] rpcbind: Change prognum, versnum, minvers, and maxvers in progping to rpcprog_t and rpcvers_t " Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240439800.2246.24.camel@dyn9047022153 \
    --to=ffilzlnx@us.ibm.com \
    --cc=SteveD@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=libtirpc-devel@lists.sourceforge.net \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox