From: Jarno Rajahalme Date: Tue, 8 Jan 2013 11:41:00 +0000 (+0200) Subject: datapath: Change ENOENT return value to ENODEV in lookup_vport(). X-Git-Tag: sliver-openvswitch-1.9.90-3~10^2~23 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=17535c57bf1a0fd1b298ba54adb8831fc99e667c;p=sliver-openvswitch.git datapath: Change ENOENT return value to ENODEV in lookup_vport(). This reduces the number of valid "no such device" error values that need special attention by the caller. Userspace code will need to keep on checking for both ENODEV and ENOENT as long as older kernel modules are around. Signed-off-by: Jarno Rajahalme Signed-off-by: Jesse Gross --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 30e26a770..14c5c540c 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1679,7 +1679,7 @@ static struct vport *lookup_vport(struct net *net, vport = ovs_vport_rtnl_rcu(dp, port_no); if (!vport) - return ERR_PTR(-ENOENT); + return ERR_PTR(-ENODEV); return vport; } else return ERR_PTR(-EINVAL);