Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rk3576 Downstream U-Boot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Frattaroli
Rk3576 Downstream U-Boot
Commits
23a7a32d
Commit
23a7a32d
authored
19 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Patches
Plain Diff
Fix return code of NFS command
Patch by Hiroshi Ito, 11 Dec 2004
parent
3836221d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG
+3
-0
3 additions, 0 deletions
CHANGELOG
net/nfs.c
+9
-5
9 additions, 5 deletions
net/nfs.c
with
12 additions
and
5 deletions
CHANGELOG
+
3
−
0
View file @
23a7a32d
...
...
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.3:
======================================================================
* Fix return code of NFS command
Patch by Hiroshi Ito, 11 Dec 2004
* Fix typo
* Fix compiler warnings in cpu/ppc4xx/usbdev.c
...
...
This diff is collapsed.
Click to expand it.
net/nfs.c
+
9
−
5
View file @
23a7a32d
...
...
@@ -44,6 +44,7 @@ static int nfs_len;
static
char
dirfh
[
NFS_FHSIZE
];
/* file handle of directory */
static
char
filefh
[
NFS_FHSIZE
];
/* file handle of kernel image */
static
int
NfsDownloadState
;
static
IPaddr_t
NfsServerIP
;
static
int
NfsSrvMountPort
;
static
int
NfsSrvNfsPort
;
...
...
@@ -63,7 +64,7 @@ static char *nfs_filename;
static
char
*
nfs_path
;
static
char
nfs_path_buff
[
2048
];
static
__inline__
void
static
__inline__
int
store_block
(
uchar
*
src
,
unsigned
offset
,
unsigned
len
)
{
ulong
newsize
=
offset
+
len
;
...
...
@@ -82,8 +83,7 @@ store_block (uchar * src, unsigned offset, unsigned len)
rc
=
flash_write
((
uchar
*
)
src
,
(
ulong
)(
load_addr
+
offset
),
len
);
if
(
rc
)
{
flash_perror
(
rc
);
NetState
=
NETLOOP_FAIL
;
return
;
return
-
1
;
}
}
else
#endif
/* CFG_DIRECT_FLASH_NFS */
...
...
@@ -93,6 +93,7 @@ store_block (uchar * src, unsigned offset, unsigned len)
if
(
NetBootFileXferSize
<
(
offset
+
len
))
NetBootFileXferSize
=
newsize
;
return
0
;
}
static
char
*
...
...
@@ -573,7 +574,8 @@ nfs_read_reply (uchar *pkt, unsigned len)
}
rlen
=
ntohl
(
rpc_pkt
.
u
.
reply
.
data
[
18
]);
store_block
((
uchar
*
)
pkt
+
sizeof
(
rpc_pkt
.
u
.
reply
),
nfs_offset
,
rlen
);
if
(
store_block
((
uchar
*
)
pkt
+
sizeof
(
rpc_pkt
.
u
.
reply
),
nfs_offset
,
rlen
)
)
return
-
9999
;
return
rlen
;
}
...
...
@@ -632,7 +634,7 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
NetState
=
NETLOOP_FAIL
;
}
else
{
puts
(
"
\n
done
\n
"
);
NetState
=
N
ETLOOP_SUCCESS
;
NetState
=
N
fsDownloadState
;
}
break
;
...
...
@@ -678,6 +680,7 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
NfsState
=
STATE_READLINK_REQ
;
NfsSend
();
}
else
{
if
(
!
rlen
)
NfsDownloadState
=
NETLOOP_SUCCESS
;
NfsState
=
STATE_UMOUNT_REQ
;
NfsSend
();
}
...
...
@@ -692,6 +695,7 @@ NfsStart (void)
#ifdef NFS_DEBUG
printf
(
"%s
\n
"
,
__FUNCTION__
);
#endif
NfsDownloadState
=
NETLOOP_FAIL
;
NfsServerIP
=
NetServerIP
;
nfs_path
=
(
char
*
)
nfs_path_buff
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment