On Tue, 08 Nov 2011 01:05:01 +0100 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
while (ops[i] != 0) {
if (find_opcode(curopcodes, ops[i]) == -1)msg_pspew("checking for opcode 0x%02x\n", ops[i]);
return 0;
return ops[i];
Can you return 1 (or -1 or some other nonzero value) instead? Returning one missing opcode reduces redability and provides no gain (other missing opcodes are ignored). Unless I'm mistaken, we'll see the available opcodes anyway in the verbose log.
IF there is a verbose log, you are right (the error mentioning the missing opcode was msg_pinfo iirc). if not and flashrom bricks the computer we wont get far without a verbose log anyway :) i have also renamed the function as discussed on IRC.
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
\o/
eventually committed in r1461. there might be some things in the commit that you frowned upon before, but my reply to your mails remained unanswered. one example is mixing hex with decimal output in error messages.