Attention is currently required from: Edward O'Callaghan, Alexander Goncharov.
1 comment:
File dummyflasher.c:
data->refs_cnt += ((dummy_buses_supported & BUS_PROG) != BUS_NONE);
data->refs_cnt += ((dummy_buses_supported & BUS_NONSPI) != BUS_NONE);
data->refs_cnt += ((dummy_buses_supported & BUS_SPI) != BUS_NONE);
#if 0
data->refs_cnt += (dummy_buses_supported & BUS_PROG) ? 1 : 0;
data->refs_cnt += (dummy_buses_supported & BUS_NONSPI) ? 1 : 0;
data->refs_cnt += (dummy_buses_supported & BUS_SPI) ? 1 : 0;
#endif
I thought about it at first sight. But this approach may potentially cause flashrom to crash. […]
Okay, I understand, thanks for explanation!
The main thing I take from this is: if any one register_master fails, init fails. But the code at the moment is trying to register all masters anyway. Even though just one failure makes init fail.
I still want to use the same conditions. Technically, refs_cnt should increase for every successful register master. So an amendment to my initial idea: add
if (!ret)
refs_cnt++;
into every if below
?
To view, visit change 72408. To unsubscribe, or for help writing mail filters, visit settings.