void Squeak_Image_Reader::read_header() { fprintf(stdout, "reading snapshot header\n"); check_image_version(); // headerStart := (self sqImageFilePosition: f) - bytesPerWord. "record header start position" headerStart = ftell(image_file) - bytesPerWord; headerSize = get_long(); dataSize = get_long(); oldBaseAddr = (char*)get_long(); specialObjectsOop = Oop::from_bits(get_long()); lastHash = get_long(); if (lastHash == 0) lastHash = 999; savedWindowSize = get_long(); fullScreenFlag = get_long(); extraVMMemory = get_long(); }
int do_board_upgrade_check(char *img) { if (is_authentication_check_enabled()) { if (!get_sections()) { printf("Error: %s is not a signed image\n", img); return 1; } if (!is_image_authenticated()) { printf("Error: \"%s\" couldn't be authenticated. Abort...\n", img); return 1; } if (!check_image_version()) { printf("Error: \"%s\" couldn't be upgraded. Abort...\n", img); return 1; } } return 0; }