Lines Matching defs: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. */
134 warnx("Failed to alloc flash memory: %s", mfi_status(status));
148 nread = read(flash, buf, FLASH_BUF_SIZE);
150 warnx("Bad read from flash file");
171 /* Kick off the flash. */
172 printf("WARNING: Firmware flash in progress, do not reboot machine... ");
188 close(flash);
192 MFI_COMMAND(top, flash, flash_adapter);