[ovs-dev] [PATCH 14/16] netdev: Allow get_ifindex and get_features to be null.
jesse at nicira.com
Wed Apr 14 18:46:16 UTC 2010
On Wed, Apr 14, 2010 at 2:17 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Tue, Apr 13, 2010 at 10:41:16AM -0400, Jesse Gross wrote:
> > Allow netdev providers to set get_ifindex and get_features it
> > null if they would always return EOPNOTSUPP. This is particuarly
> > useful for virtual devices.
> Looks fine, but the formatting here looks extra awkward to me:
> > @@ -661,8 +675,9 @@ netdev_get_features(struct netdev *netdev,
> > peer = &dummy;
> > }
> > - error = netdev_get_dev(netdev)->netdev_class->get_features(netdev,
> > - advertised, supported, peer);
> > + get_features = netdev_get_dev(netdev)->netdev_class->get_features;
> > + error = get_features ?get_features(netdev, current, advertised,
> > + peer) : EOPNOTSUPP;
Yeah, that's pretty bad. Fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev