Exit building if romstage.bin is larger than size of XIP
[coreboot.git] / util / cbfstool / cbfstool.c
index b8abb515bf42cdddcb3dbb9a2f7b49c9958468ac..939221e66d61133d372594a7da65f3ab7382e156 100644 (file)
@@ -232,9 +232,10 @@ static int cbfs_locate(int argc, char **argv)
        uint32_t filesize = getfilesize(file);
        const char *filename = argv[4];
        int align = strtoul(argv[5], NULL, 0);
+       uint32_t location = cbfs_find_location(romname, filesize, filename, align);
 
-       printf("%x\n", cbfs_find_location(romname, filesize, filename, align));
-       return 0;
+       printf("%x\n", location);
+       return location == 0 ? 1 : 0;
 }
 
 static int cbfs_print(int argc, char **argv)