[ovs-dev] [PATCH 14/16] netdev: Allow get_ifindex and get_features to be null.
Jesse Gross
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[3];
> > }
> >
> > - error = netdev_get_dev(netdev)->netdev_class->get_features(netdev,
> current,
> > - advertised, supported, peer);
> > + get_features = netdev_get_dev(netdev)->netdev_class->get_features;
> > + error = get_features ?get_features(netdev, current, advertised,
> supported,
> > + peer) : EOPNOTSUPP;
>
Yeah, that's pretty bad. Fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100414/efca16b6/attachment-0003.html>
More information about the dev
mailing list