Re: [libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

2019-04-18 Thread Michal Privoznik
On 4/17/19 5:58 PM, Cole Robinson wrote: > virDomainNetModeTypeFromString is just virEnumFromString which doesn't deference NULL int virEnumFromString(const char * const *types, unsigned int ntypes, const char *type) { size_t i; if (!type)

Re: [libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

2019-04-17 Thread Cole Robinson
On 4/17/19 3:33 AM, Michal Privoznik wrote: > On 4/16/19 7:40 PM, Cole Robinson wrote: >> On 4/16/19 11:27 AM, Michal Privoznik wrote: >>> On 3/13/19 4:51 PM, Cole Robinson wrote: This adds a network model enum. The virDomainNetDef property is named 'model' like most other devices.

Re: [libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

2019-04-17 Thread Michal Privoznik
On 4/16/19 7:40 PM, Cole Robinson wrote: On 4/16/19 11:27 AM, Michal Privoznik wrote: On 3/13/19 4:51 PM, Cole Robinson wrote: This adds a network model enum. The virDomainNetDef property is named 'model' like most other devices. When the XML parser or a driver calls NetSetModelString, if the

Re: [libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

2019-04-16 Thread Cole Robinson
On 4/16/19 11:27 AM, Michal Privoznik wrote: > On 3/13/19 4:51 PM, Cole Robinson wrote: >> This adds a network model enum. The virDomainNetDef property >> is named 'model' like most other devices. >> >> When the XML parser or a driver calls NetSetModelString, if >> the passed string is in the

Re: [libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

2019-04-16 Thread Michal Privoznik
On 3/13/19 4:51 PM, Cole Robinson wrote: This adds a network model enum. The virDomainNetDef property is named 'model' like most other devices. When the XML parser or a driver calls NetSetModelString, if the passed string is in the enum, we will set net->model, otherwise we copy the string into

[libvirt] [PATCH v2 04/11] conf: net: Add model enum, and netfront value

2019-03-13 Thread Cole Robinson
This adds a network model enum. The virDomainNetDef property is named 'model' like most other devices. When the XML parser or a driver calls NetSetModelString, if the passed string is in the enum, we will set net->model, otherwise we copy the string into net->modelstr Add a single example for