Commit fb4ceae3 authored by Henrik Nordstrom's avatar Henrik Nordstrom
Browse files

bootinfo: correct reading from file

parent c26e5ff8
...@@ -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), stdin); 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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment