Trivial patch: Make buildrom a little bit more verbose.
It shows the remaining space in an image now. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2604 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
78b5e37e8c
commit
f43cb68606
|
@ -65,10 +65,17 @@ int main(int argc, char *argv[])
|
||||||
if (fstat(payloadfd, &payloadbuf) < 0)
|
if (fstat(payloadfd, &payloadbuf) < 0)
|
||||||
fatal("stat of infile");
|
fatal("stat of infile");
|
||||||
if (payloadbuf.st_size > (romsize - size)){
|
if (payloadbuf.st_size > (romsize - size)){
|
||||||
fprintf(stderr, "payload (%d) + linuxbios (%d) size larger than ROM (%d) size!\n", payloadbuf.st_size, size, romsize);
|
fprintf(stderr, "ERROR: payload (%d) + linuxbios (%d) - Size is %d bytes larger than ROM size (%d).\n",
|
||||||
|
payloadbuf.st_size, size,
|
||||||
|
payloadbuf.st_size+size-romsize,
|
||||||
|
romsize);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("Payload: %d LinuxBIOS: %d ROM size: %d Left space: %d\n",
|
||||||
|
payloadbuf.st_size, size, romsize,
|
||||||
|
romsize-payloadbuf.st_size-size);
|
||||||
|
|
||||||
cp = malloc(romsize);
|
cp = malloc(romsize);
|
||||||
if (!cp)
|
if (!cp)
|
||||||
fatal("malloc buffer");
|
fatal("malloc buffer");
|
||||||
|
|
Loading…
Reference in New Issue