datapath: Change ENOENT return value to ENODEV in lookup_vport().
authorJarno Rajahalme <jarno.rajahalme@nsn.com>
Tue, 8 Jan 2013 11:41:00 +0000 (13:41 +0200)
committerJesse Gross <jesse@nicira.com>
Wed, 9 Jan 2013 22:24:34 +0000 (14:24 -0800)
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 <jarno.rajahalme@nsn.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c

index 30e26a7..14c5c54 100644 (file)
@@ -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);