Lines Matching full:flash
94 int error, fd, flash;
98 warnx("flash: Firmware file required");
102 flash = open(av[1], O_RDONLY);
103 if (flash < 0) {
105 warn("flash: Failed to open %s", av[1]);
112 if (fstat(flash, &sb) < 0) {
118 warnx("Invalid flash file size");
130 /* First, ask the firmware to allocate space for the flash file. */
135 warn("Failed to allocate flash memory");
139 warnx("Failed to allocate flash memory: %s",
154 nread = read(flash, buf, FLASH_BUF_SIZE);
156 warnx("Bad read from flash file");
159 warn("Failed to discard flash memory");
184 /* Kick off the flash. */
185 printf("WARNING: Firmware flash in progress, do not reboot machine... ");
205 close(flash);
209 MFI_COMMAND(top, flash, flash_adapter);