On (Wed) Jun 09 2010 [15:28:11], Amit Shah wrote: > > Let me rephrase: Behavior changes for -net types without an init() > > method. The only one without an init() method is "none". Before, > > net_client_init() succeeded for it. Now it fails. What's the impact of > > that change? And why does it make sense? > > It makes sense because we don't actually initialise anything. We don't > place anything in the nd_table[] array. That means callers shouldn't > poke in the array for any values. Returning -1 makes sense for that > reason. If we continued to return 0, callers might just assume that init > was successful and that nd_table[0] was set up for use appropriately. > > The thing is that the code doesn't go this far in case of '-net none' > anyway. This was just a potential bug lurking around for any new -net > method which didn't have an init.
Hm, I only tested -net none from the monitor, using pci_add. Looks like I skipped testing it from the cmd line. I did that today and found out the VM doesn't start. I've sent a patch to revert to the original behaviour of returning 0, and we'll have to find another way of fixing the 'success or index' return problem. Amit