diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-11-14 22:46:02 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:42 -0500 |
commit | 17c157c889f4b07258af6bfec9e4e9dcf3c00178 (patch) | |
tree | f17be049a40b5742ca7e67094d6a7063146568d5 /net/netlabel/netlabel_unlabeled.c | |
parent | 81878d27fdd297a33f3cfcf29483fe1abaf26dec (diff) |
[GENL]: Add genlmsg_put_reply() to simplify building reply headers
By modyfing genlmsg_put() to take a genl_family and by adding
genlmsg_put_reply() the process of constructing the netlink
and generic netlink headers is simplified.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlabel/netlabel_unlabeled.c')
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 57dd07b51be6..a1d4ae51db04 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -141,12 +141,8 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info) | |||
141 | ans_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); | 141 | ans_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); |
142 | if (ans_skb == NULL) | 142 | if (ans_skb == NULL) |
143 | goto list_failure; | 143 | goto list_failure; |
144 | data = netlbl_netlink_hdr_put(ans_skb, | 144 | data = genlmsg_put_reply(ans_skb, info, &netlbl_unlabel_gnl_family, |
145 | info->snd_pid, | 145 | 0, NLBL_UNLABEL_C_LIST); |
146 | info->snd_seq, | ||
147 | netlbl_unlabel_gnl_family.id, | ||
148 | 0, | ||
149 | NLBL_UNLABEL_C_LIST); | ||
150 | if (data == NULL) { | 146 | if (data == NULL) { |
151 | ret_val = -ENOMEM; | 147 | ret_val = -ENOMEM; |
152 | goto list_failure; | 148 | goto list_failure; |