NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
PATCH 1/1 NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
--- net/nfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
net/nfs.c +15 -1
@@ -481,8 +481,22 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)if (rpc_pkt.u.reply.rstatus || rpc_pkt.u.reply.verifier || rpc_pkt.u.reply.astatus || - rpc_pkt.u.reply.data[0 ]) + rpc_pkt.u.reply.data[0 ]){ +switch (ntohl (rpc_pkt.u.reply.astatus)){ +case 0 :/* Not an error */ +break ; +case 2 :/* Remote can't support NFS version */ +printf ("*** ERROR: NFS version not supported: Requested: V%d, accepted: min V%d - max V%d\n" , +2 , +ntohl (rpc_pkt.u.reply.data[0 ]), +ntohl (rpc_pkt.u.reply.data[1 ])); +break ; +default :/* Unknown error on 'accept state' flag */ +printf ("*** ERROR: accept state error (%d)\n" ,ntohl (rpc_pkt.u.reply.astatus)); +break ; + }return -1 ; + }memcpy (filefh, rpc_pkt.u.reply.data +1 ,NFS_FHSIZE );
Signature · 1 line
1.8.4.5
PATCH 1/1 NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
Quoted 2 lines · Guillaume GARDET
Signed-off-by Guillaume GARDET <[email protected]>Cc joe.hershberger at ni.com
PATCH 1/1 NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
Le 07/06/2016 17:56, Joe Hershberger a ?crit :
Quoted 6 lines
Quoted 2 lines · Guillaume GARDET
Signed-off-by Guillaume GARDET <[email protected]>Cc joe.hershberger at ni.comAcked-by Joe Hershberger <[email protected]>
Joe, you will add it to u-boot-net repo and then send a pull request to Tom or Tom will directly pick it up?
Guillaume
PATCH 1/1 NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
Quoted 7 lines · Guillaume Gardet
Le 07/06/2016 17:56, Joe Hershberger a ?crit :
Quoted 4 lines
Quoted 1 line · Guillaume GARDET
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Guillaume GARDET <[email protected]>Cc joe.hershberger at ni.comAcked-by Joe Hershberger <[email protected]>Joe, you will add it to u-boot-net repo and then send a pull request to Tom or Tom will directly pick it up?
I'll take tare of it.
-Joe
PATCH 1/1 NFS: Add error message when U-Boot NFS version (V2) is not supported by NFS server
In reply to Guillaume GARDETHi Guillaume,
Quoted 12 lines · Guillaume GARDET
Signed-off-by Guillaume GARDET <[email protected]>Cc joe.hershberger at ni.com--- net/nfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)net/nfs.c +0
-0
net/nfs.c static int nfs_lookup_reply(uchar *pkt, unsigned len) · line 485
Quoted 6 lines
net/nfs.c +2
-1@@ -481,8 +481,22 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)if (rpc_pkt.u.reply.rstatus || rpc_pkt.u.reply.verifier || rpc_pkt.u.reply.astatus || - rpc_pkt.u.reply.data[0 ]) + rpc_pkt.u.reply.data[0 ]){ +switch (ntohl (rpc_pkt.u.reply.astatus)){
There are 7 checkpatch.pl issues with this patch. I'll fix them when I apply it, but in the future, please at least run checkpatch and follow the coding conventions. Even better would be to use tools/patman.
...
-Joe