diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-07 16:12:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-10 15:30:41 -0400 |
commit | 15e473046cb6e5d18a4d0057e61d76315230382b (patch) | |
tree | 893d2df5d46a6ce156933ac57a1398f0ad22b889 /net/phonet/pn_netlink.c | |
parent | 9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e (diff) |
netlink: Rename pid to portid to avoid confusion
It is a frequent mistake to confuse the netlink port identifier with a
process identifier. Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.
I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.
I have successfully built an allyesconfig kernel with this change.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/pn_netlink.c')
-rw-r--r-- | net/phonet/pn_netlink.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index 7dd762a464e5..83a8389619aa 100644 --- a/net/phonet/pn_netlink.c +++ b/net/phonet/pn_netlink.c | |||
@@ -33,7 +33,7 @@ | |||
33 | /* Device address handling */ | 33 | /* Device address handling */ |
34 | 34 | ||
35 | static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, | 35 | static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, |
36 | u32 pid, u32 seq, int event); | 36 | u32 portid, u32 seq, int event); |
37 | 37 | ||
38 | void phonet_address_notify(int event, struct net_device *dev, u8 addr) | 38 | void phonet_address_notify(int event, struct net_device *dev, u8 addr) |
39 | { | 39 | { |
@@ -101,12 +101,12 @@ static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, | 103 | static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, |
104 | u32 pid, u32 seq, int event) | 104 | u32 portid, u32 seq, int event) |
105 | { | 105 | { |
106 | struct ifaddrmsg *ifm; | 106 | struct ifaddrmsg *ifm; |
107 | struct nlmsghdr *nlh; | 107 | struct nlmsghdr *nlh; |
108 | 108 | ||
109 | nlh = nlmsg_put(skb, pid, seq, event, sizeof(*ifm), 0); | 109 | nlh = nlmsg_put(skb, portid, seq, event, sizeof(*ifm), 0); |
110 | if (nlh == NULL) | 110 | if (nlh == NULL) |
111 | return -EMSGSIZE; | 111 | return -EMSGSIZE; |
112 | 112 | ||
@@ -148,7 +148,7 @@ static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb) | |||
148 | continue; | 148 | continue; |
149 | 149 | ||
150 | if (fill_addr(skb, pnd->netdev, addr << 2, | 150 | if (fill_addr(skb, pnd->netdev, addr << 2, |
151 | NETLINK_CB(cb->skb).pid, | 151 | NETLINK_CB(cb->skb).portid, |
152 | cb->nlh->nlmsg_seq, RTM_NEWADDR) < 0) | 152 | cb->nlh->nlmsg_seq, RTM_NEWADDR) < 0) |
153 | goto out; | 153 | goto out; |
154 | } | 154 | } |
@@ -165,12 +165,12 @@ out: | |||
165 | /* Routes handling */ | 165 | /* Routes handling */ |
166 | 166 | ||
167 | static int fill_route(struct sk_buff *skb, struct net_device *dev, u8 dst, | 167 | static int fill_route(struct sk_buff *skb, struct net_device *dev, u8 dst, |
168 | u32 pid, u32 seq, int event) | 168 | u32 portid, u32 seq, int event) |
169 | { | 169 | { |
170 | struct rtmsg *rtm; | 170 | struct rtmsg *rtm; |
171 | struct nlmsghdr *nlh; | 171 | struct nlmsghdr *nlh; |
172 | 172 | ||
173 | nlh = nlmsg_put(skb, pid, seq, event, sizeof(*rtm), 0); | 173 | nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), 0); |
174 | if (nlh == NULL) | 174 | if (nlh == NULL) |
175 | return -EMSGSIZE; | 175 | return -EMSGSIZE; |
176 | 176 | ||
@@ -276,7 +276,7 @@ static int route_dumpit(struct sk_buff *skb, struct netlink_callback *cb) | |||
276 | 276 | ||
277 | if (addr_idx++ < addr_start_idx) | 277 | if (addr_idx++ < addr_start_idx) |
278 | continue; | 278 | continue; |
279 | if (fill_route(skb, dev, addr << 2, NETLINK_CB(cb->skb).pid, | 279 | if (fill_route(skb, dev, addr << 2, NETLINK_CB(cb->skb).portid, |
280 | cb->nlh->nlmsg_seq, RTM_NEWROUTE)) | 280 | cb->nlh->nlmsg_seq, RTM_NEWROUTE)) |
281 | goto out; | 281 | goto out; |
282 | } | 282 | } |