On Tue, 1 Nov 2016 23:57:55 +0800 Xiao Guangrong <guangrong.x...@linux.intel.com> wrote:
> On 11/01/2016 09:58 PM, Igor Mammedov wrote: > > >> > >> I mean, for example. if there are two devices, the first one is failed to > >> be > >> realized, the second one is init-ed successfully, then can > >> nvdimm_plugged_device_list() get these two devices? > >> > >> Based the code of pc_dimm_built_list(), i guess yes. > > nope, > > read qdev_device_add() end result: > > - on success device in QOM tree > > - on failure device is destroyed > > Okay, pc_dimm_built_list let me mislead the failed case. > so this function also can be refined. pc_dimm_built_list() uses realized flag to get already present devices and that's not what you need.