summaryrefslogtreecommitdiffstats
path: root/kernel/taskstats.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2006-11-14 19:46:02 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:22:42 -0800
commit17c157c889f4b07258af6bfec9e4e9dcf3c00178 (patch)
treef17be049a40b5742ca7e67094d6a7063146568d5 /kernel/taskstats.c
parent81878d27fdd297a33f3cfcf29483fe1abaf26dec (diff)
downloadlinux-17c157c889f4b07258af6bfec9e4e9dcf3c00178.tar.gz
linux-17c157c889f4b07258af6bfec9e4e9dcf3c00178.tar.bz2
linux-17c157c889f4b07258af6bfec9e4e9dcf3c00178.zip
[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 'kernel/taskstats.c')
-rw-r--r--kernel/taskstats.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index faa5239813ce..d3d28919d4b4 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -85,13 +85,9 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp,
int seq = get_cpu_var(taskstats_seqnum)++;
put_cpu_var(taskstats_seqnum);
- reply = genlmsg_put(skb, 0, seq,
- family.id, 0, 0,
- cmd, family.version);
+ reply = genlmsg_put(skb, 0, seq, &family, 0, cmd);
} else
- reply = genlmsg_put(skb, info->snd_pid, info->snd_seq,
- family.id, 0, 0,
- cmd, family.version);
+ reply = genlmsg_put_reply(skb, info, &family, 0, cmd);
if (reply == NULL) {
nlmsg_free(skb);
return -EINVAL;