Yonggang Luo <[email protected]> writes: > On Mon, Sep 28, 2026 at 8:18 PM Markus Armbruster <[email protected]> wrote: >> >> Yonggang Luo <[email protected]> writes: >> >> > On Mon, Sep 28, 2026 at 7:48 PM Markus Armbruster <[email protected]> > wrote: >> >> >> >> Yonggang Luo <[email protected]> writes: >> >> >> >> > Add a none target for when no TargetInfo is selected. It is last >> >> > so existing SYS_EMU_TARGET_* values stay put, and it is not a >> >> > qemu-system- executable name. target_is_none() and target_none() >> >> > report that state. >> >> >> >> Why does it matter that existing SYS_EMU_TARGET_* stay put? >> > >> > We need a state that not a real CPU target is selected( I called it > none), >> > then we can use it to list all targets. for example, do query-targets. >> > query-machines(all machines for all targets). >> > Any better ways to handle it would be appreciated, I am not choosing to > set >> > it to NULL because >> > that would cause too much NULL-check error, as the pre-existing code >> > presume there is always a >> > CPU target present. >> >> Doesn't answer my question, so let me try again :) >> >> In your commit message, you explain "it is last so existing >> SYS_EMU_TARGET_* values stay put". They do, but why is that useful? > > Just to keep the pre-existing enum value not changed, yeap, not that useful. > I'll drop this misleading comment. Another choice is keep none > as the first enum value, so it's always "0", maybe that's better?
I think it is, because similar "none" are first elsewhere.
