diff options
author | Thomas Graf <tgr@lsx.localdomain> | 2008-05-23 21:45:14 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@lsx.localdomain> | 2008-05-23 21:45:14 (GMT) |
commit | d84430702496f617c01c5e2d27d0e82e02390bb7 (patch) | |
tree | df85d57f3a57c76fa375b57dacc8379e32efe0fe /lib/route/cls/fw.c | |
parent | 10cf5a586c149fdb7e2639000dbfae5e6f8522a5 (diff) | |
download | libnl-d84430702496f617c01c5e2d27d0e82e02390bb7.zip libnl-d84430702496f617c01c5e2d27d0e82e02390bb7.tar.gz libnl-d84430702496f617c01c5e2d27d0e82e02390bb7.tar.bz2 |
Remove old line counting while dumping
Diffstat (limited to 'lib/route/cls/fw.c')
-rw-r--r-- | lib/route/cls/fw.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/lib/route/cls/fw.c b/lib/route/cls/fw.c index fd91e32..d18d3f8 100644 --- a/lib/route/cls/fw.c +++ b/lib/route/cls/fw.c @@ -127,48 +127,32 @@ static int fw_clone(struct rtnl_cls *_dst, struct rtnl_cls *_src) return 0; } -static int fw_dump_brief(struct rtnl_cls *cls, struct nl_dump_params *p, - int line) +static void fw_dump_line(struct rtnl_cls *cls, struct nl_dump_params *p) { struct rtnl_fw *f = fw_cls(cls); char buf[32]; if (!f) - goto ignore; + return; if (f->cf_mask & FW_ATTR_CLASSID) - dp_dump(p, " target %s", + nl_dump(p, " target %s", rtnl_tc_handle2str(f->cf_classid, buf, sizeof(buf))); - -ignore: - return line; } -static int fw_dump_full(struct rtnl_cls *cls, struct nl_dump_params *p, - int line) +static void fw_dump_details(struct rtnl_cls *cls, struct nl_dump_params *p) { struct rtnl_fw *f = fw_cls(cls); if (!f) - goto ignore; + return; if (f->cf_mask & FW_ATTR_INDEV) - dp_dump(p, "indev %s ", f->cf_indev); - -ignore: - return line; + nl_dump(p, "indev %s ", f->cf_indev); } -static int fw_dump_stats(struct rtnl_cls *cls, struct nl_dump_params *p, - int line) +static void fw_dump_stats(struct rtnl_cls *cls, struct nl_dump_params *p) { - struct rtnl_fw *f = fw_cls(cls); - - if (!f) - goto ignore; - -ignore: - return line; } static struct nl_msg *fw_get_opts(struct rtnl_cls *cls) @@ -226,9 +210,11 @@ static struct rtnl_cls_ops fw_ops = { .co_free_data = fw_free_data, .co_clone = fw_clone, .co_get_opts = fw_get_opts, - .co_dump[NL_DUMP_BRIEF] = fw_dump_brief, - .co_dump[NL_DUMP_FULL] = fw_dump_full, - .co_dump[NL_DUMP_STATS] = fw_dump_stats, + .co_dump = { + [NL_DUMP_LINE] = fw_dump_line, + [NL_DUMP_DETAILS] = fw_dump_details, + [NL_DUMP_STATS] = fw_dump_stats, + }, }; static void __init fw_init(void) |