* [U-Boot] [PATCH] net: Fix incorrect RPC packets on 64-bit systems
@ 2016-07-01 11:19 Ralf Hubert
2016-07-06 15:10 ` Joe Hershberger
2016-07-12 17:28 ` [U-Boot] " Joe Hershberger
0 siblings, 2 replies; 3+ messages in thread
From: Ralf Hubert @ 2016-07-01 11:19 UTC (permalink / raw)
To: u-boot
This patch fixes incorrect RPC packet layout caused by
'long' type size difference on 64 and 32-bit architectures.
Signed-off-by: Ralf Hubert <r.hubert@technisat.de>
---
net/nfs.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/nfs.c b/net/nfs.c
index 381b75f..dd4a3dc 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -131,7 +131,7 @@ dirname(char *path)
/**************************************************************************
RPC_ADD_CREDENTIALS - Add RPC authentication/verifier entries
**************************************************************************/
-static long *rpc_add_credentials(long *p)
+static uint32_t *rpc_add_credentials(uint32_t *p)
{
int hl;
int hostnamelen;
@@ -243,7 +243,7 @@ nfs_mount_req(char *path)
pathlen = strlen(path);
p = &(data[0]);
- p = (uint32_t *)rpc_add_credentials((long *)p);
+ p = rpc_add_credentials(p);
*p++ = htonl(pathlen);
if (pathlen & 3)
@@ -271,7 +271,7 @@ nfs_umountall_req(void)
return;
p = &(data[0]);
- p = (uint32_t *)rpc_add_credentials((long *)p);
+ p = rpc_add_credentials(p);
len = (uint32_t *)p - (uint32_t *)&(data[0]);
@@ -293,7 +293,7 @@ nfs_readlink_req(void)
int len;
p = &(data[0]);
- p = (uint32_t *)rpc_add_credentials((long *)p);
+ p = rpc_add_credentials(p);
memcpy(p, filefh, NFS_FHSIZE);
p += (NFS_FHSIZE / 4);
@@ -317,7 +317,7 @@ nfs_lookup_req(char *fname)
fnamelen = strlen(fname);
p = &(data[0]);
- p = (uint32_t *)rpc_add_credentials((long *)p);
+ p = rpc_add_credentials(p);
memcpy(p, dirfh, NFS_FHSIZE);
p += (NFS_FHSIZE / 4);
@@ -343,7 +343,7 @@ nfs_read_req(int offset, int readlen)
int len;
p = &(data[0]);
- p = (uint32_t *)rpc_add_credentials((long *)p);
+ p = rpc_add_credentials(p);
memcpy(p, filefh, NFS_FHSIZE);
p += (NFS_FHSIZE / 4);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] net: Fix incorrect RPC packets on 64-bit systems
2016-07-01 11:19 [U-Boot] [PATCH] net: Fix incorrect RPC packets on 64-bit systems Ralf Hubert
@ 2016-07-06 15:10 ` Joe Hershberger
2016-07-12 17:28 ` [U-Boot] " Joe Hershberger
1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2016-07-06 15:10 UTC (permalink / raw)
To: u-boot
On Fri, Jul 1, 2016 at 6:19 AM, Ralf Hubert <r.hubert@technisat.de> wrote:
> This patch fixes incorrect RPC packet layout caused by
> 'long' type size difference on 64 and 32-bit architectures.
>
> Signed-off-by: Ralf Hubert <r.hubert@technisat.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] net: Fix incorrect RPC packets on 64-bit systems
2016-07-01 11:19 [U-Boot] [PATCH] net: Fix incorrect RPC packets on 64-bit systems Ralf Hubert
2016-07-06 15:10 ` Joe Hershberger
@ 2016-07-12 17:28 ` Joe Hershberger
1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2016-07-12 17:28 UTC (permalink / raw)
To: u-boot
Hi Ralf,
https://patchwork.ozlabs.org/patch/643461/ was applied to u-boot-net.git.
Thanks!
-Joe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-12 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01 11:19 [U-Boot] [PATCH] net: Fix incorrect RPC packets on 64-bit systems Ralf Hubert
2016-07-06 15:10 ` Joe Hershberger
2016-07-12 17:28 ` [U-Boot] " Joe Hershberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.