You mean with QDict? I'll look into that now. But already sent v5 before
reading this email.
Yes, with reading it from the QDict. (Or whatever the simplest way is
that results in the right external interface, but I suppose this is the
one.)
Well, there is a problem with that: I can easily isolate
l2-cache-size from QDict, check if it is "full", and if it is - do whatever
is needed, and delete this option before parsing. But what if it is "foo"?
It will not get deleted, and the regular QEMU_OPT_SIZE parsing error will
appear, stating that l2-cache-size "expects a non-negative number..." - no
word about that it can expect "full" as well. Now, one can try to modify
local_err->msg for this particular option, but this will require substantial
additional logic. I think considering this, it would be easier to stick with
a dedicated option, l2-cache-full.
Do you think there is a smarter way to parse the l2-cache-size option, so it
would accept both size and "full", while handling errors correctly? It seems
more elegant to have a single option, but the internal handling will be more
elegant and simpler with two mutually exclusive options.