qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 05/30] bootindex: rework add_boot_device_path


From: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH v9 05/30] bootindex: rework add_boot_device_path function
Date: Thu, 11 Sep 2014 07:27:36 +0000

Hi,

> Subject: Re: [PATCH v9 05/30] bootindex: rework add_boot_device_path
> function
> 
> > +static void del_original_boot_device(DeviceState *dev, const char *suffix)
> 
> Hmm, now we have two simliar delete functions.  One which deletes all
> entries belonging to a device, and one deleting only in case the suffix
> matches (the later being needed to handle the floppy case I guess?).
> 
Yes.

> Can't we combine the two into one, to avoid code duplication?

Yes, we can. :)

> For example by deleting all entries for a device in case suffix == NULL?
> 
Good point. When we hot-unplug a device we can pass 'suffix == NULL'
to del_original_boot_device(DeviceState *dev, const char *suffix), and
then remove all entries belonging to this device.

Thanks! Will rework it.

Best regards,
-Gonglei


reply via email to

[Prev in Thread] Current Thread [Next in Thread]