Try to read firmware image before prompting the user to confirm
firmware download. This correctly prints an error and exits for an incorrect firmware image name before prompting the user to confirm the download. Sponsored by: Intel MFC after: 3 days
This commit is contained in:
parent
821ef73ca6
commit
fdfa4d2d35
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=253110
@ -253,6 +253,9 @@ firmware(int argc, char *argv[])
|
|||||||
"of available images\n",
|
"of available images\n",
|
||||||
slot, controller);
|
slot, controller);
|
||||||
|
|
||||||
|
if (f_flag)
|
||||||
|
read_image_file(image, &buf, &size);
|
||||||
|
|
||||||
if (f_flag && a_flag)
|
if (f_flag && a_flag)
|
||||||
printf("You are about to download and activate "
|
printf("You are about to download and activate "
|
||||||
"firmware image (%s) to controller %s.\n"
|
"firmware image (%s) to controller %s.\n"
|
||||||
@ -282,7 +285,6 @@ firmware(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (f_flag) {
|
if (f_flag) {
|
||||||
read_image_file(image, &buf, &size);
|
|
||||||
update_firmware(fd, buf, size);
|
update_firmware(fd, buf, size);
|
||||||
if (a_flag)
|
if (a_flag)
|
||||||
activate_firmware(fd, slot,
|
activate_firmware(fd, slot,
|
||||||
|
Loading…
Reference in New Issue
Block a user