Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
fb4ceae3
Commit
fb4ceae3
authored
Jul 13, 2012
by
Henrik Nordstrom
Browse files
bootinfo: correct reading from file
parent
c26e5ff8
Changes
1
Show whitespace changes
Inline
Side-by-side
bootinfo.c
View file @
fb4ceae3
...
@@ -286,7 +286,7 @@ int main(int argc, char * argv[])
...
@@ -286,7 +286,7 @@ int main(int argc, char * argv[])
}
hdr
;
}
hdr
;
int
len
;
int
len
;
len
=
fread
(
&
hdr
,
1
,
sizeof
(
hdr
),
std
in
);
len
=
fread
(
&
hdr
,
1
,
sizeof
(
hdr
),
in
);
if
(
len
<
(
int
)
sizeof
(
boot_file_head_t
))
if
(
len
<
(
int
)
sizeof
(
boot_file_head_t
))
fail
(
"Failed to read header:"
);
fail
(
"Failed to read header:"
);
if
(
strncmp
((
char
*
)
hdr
.
boot
.
magic
,
BOOT0_MAGIC
,
strlen
(
BOOT0_MAGIC
))
==
0
)
{
if
(
strncmp
((
char
*
)
hdr
.
boot
.
magic
,
BOOT0_MAGIC
,
strlen
(
BOOT0_MAGIC
))
==
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment