Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=038890fed8d1fa95bbbdeb517f5710eb75fa9e2e
Commit:     038890fed8d1fa95bbbdeb517f5710eb75fa9e2e
Parent:     716ea3a7aae3a2bfc44cb97b5419c1c9868c7bc9
Author:     Thomas Graf <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 5 14:35:52 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:28:34 2007 -0700

    [RTNL]: Improve error codes for unsupported operations
    
    The most common trigger of these errors is that the
    config option hasn't been enable wich would make the
    functionality available. Therefore returning EOPNOTSUPP
    gives a better idea on what is going wrong.
    
    Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/rtnetlink.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index fa5f938..5266df3 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -862,7 +862,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct 
nlmsghdr *nlh)
 
        type = nlh->nlmsg_type;
        if (type > RTM_MAX)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        type -= RTM_BASE;
 
@@ -885,7 +885,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct 
nlmsghdr *nlh)
 
                dumpit = rtnl_get_dumpit(family, type);
                if (dumpit == NULL)
-                       return -EINVAL;
+                       return -EOPNOTSUPP;
 
                return netlink_dump_start(rtnl, skb, nlh, dumpit, NULL);
        }
@@ -913,7 +913,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct 
nlmsghdr *nlh)
 
        doit = rtnl_get_doit(family, type);
        if (doit == NULL)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        return doit(skb, nlh, (void *)&rta_buf[0]);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to