From 181c4ec2702bf21fc9914075ec6c2bd337b63a57 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 16 Jul 2013 15:45:37 +0000 Subject: [PATCH] Do not throw an error if the user requests to activate the image from an empty firmware slot, as long as the user has specified a firmware image to download into the empty firmware slot. Sponsored by: Intel Reported by: Joe Golio MFC after: 3 days --- sbin/nvmecontrol/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/nvmecontrol/firmware.c b/sbin/nvmecontrol/firmware.c index 66c751736ad4..cb7fb0f9d55d 100644 --- a/sbin/nvmecontrol/firmware.c +++ b/sbin/nvmecontrol/firmware.c @@ -246,7 +246,7 @@ firmware(int argc, char *argv[]) "slot %d specified but controller only supports %d slots", slot, cdata.frmw.num_slots); - if (!slot_has_valid_firmware(fd, slot)) + if (a_flag && !f_flag && !slot_has_valid_firmware(fd, slot)) errx(1, "slot %d does not contain valid firmware,\n" "try 'nvmecontrol logpage -p 3 %s' to get a list "