nwztools/scsitools: make do_fw_upgrade output less confusing

Change-Id: If616e646aeddf20aa3cee79a821a420d9102c708
This commit is contained in:
Amaury Pouly 2017-09-19 21:53:52 +02:00
parent 99cc8f8802
commit 5f4de5bf48

View file

@ -758,9 +758,13 @@ int do_fw_upgrade(int argc, char **argv)
cprintf(GREY, "An error occured during request\n");
return ret;
}
buffer[buffer_size] = 0;
cprintf_field("Result:", "\n");
print_hex(buffer, buffer_size);
/* the device is not supposed to send back anything but if it does, print it */
if(buffer_size > 0)
{
buffer[buffer_size] = 0;
cprintf_field("Result:", "\n");
print_hex(buffer, buffer_size);
}
return 0;
}