|
From: | Romain Dolbeau |
Subject: | Re: [Qemu-devel] [PATCH] e1000: add the ability to select among several specific types of e1000, plus some pointers to documentations and details. |
Date: | Tue, 25 Feb 2014 09:58:10 +0100 |
> -#define E1000(obj) \No, don't go backwards in time please. Take a look at e.g. eepro100,> - OBJECT_CHECK(E1000State, (obj), TYPE_E1000)
> +#define E1000(obj) \
> + DO_UPCAST(E1000State, parent_obj, obj)
which already registers multiple data-driven subtypes for instance. The
key to making it work is to introduce an abstract base type matching
E1000() macro, with original "e1000" type becoming a subtype thereof.
> @@ -1572,6 +1572,9 @@ static const char * const pci_nic_models[] = {I would hope that adding to these two legacy lists is not necessary for> @@ -1584,6 +1587,9 @@ static const char * const pci_nic_names[] = {
new types. They should be created using -device, not -net nic,model=.
[Prev in Thread] | Current Thread | [Next in Thread] |