From 47ff571046570e8f70f545de162e09c2ff147f80 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 8 Dec 2012 18:08:44 +0100 Subject: debug: include verbose message in all BUG statements Signed-off-by: Patrick McHardy --- src/rule.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 3bf48aac..e90e6179 100644 --- a/src/rule.c +++ b/src/rule.c @@ -329,7 +329,7 @@ void cmd_free(struct cmd *cmd) table_free(cmd->table); break; default: - BUG(); + BUG("invalid command object type %u\n", cmd->obj); } } xfree(cmd); @@ -411,7 +411,7 @@ static int do_command_add(struct netlink_ctx *ctx, struct cmd *cmd) case CMD_OBJ_SETELEM: return do_add_setelems(ctx, &cmd->handle, cmd->expr); default: - BUG(); + BUG("invalid command object type %u\n", cmd->obj); } return 0; } @@ -430,7 +430,7 @@ static int do_command_delete(struct netlink_ctx *ctx, struct cmd *cmd) case CMD_OBJ_SETELEM: return netlink_delete_setelems(ctx, &cmd->handle, cmd->expr); default: - BUG(); + BUG("invalid command object type %u\n", cmd->obj); } } @@ -493,7 +493,7 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd) } return 0; default: - BUG(); + BUG("invalid command object type %u\n", cmd->obj); } list_for_each_entry_safe(rule, nrule, &ctx->list, list) { @@ -519,7 +519,7 @@ static int do_command_flush(struct netlink_ctx *ctx, struct cmd *cmd) case CMD_OBJ_CHAIN: return netlink_flush_chain(ctx, &cmd->handle); default: - BUG(); + BUG("invalid command object type %u\n", cmd->obj); } return 0; } @@ -536,7 +536,7 @@ int do_command(struct netlink_ctx *ctx, struct cmd *cmd) case CMD_FLUSH: return do_command_flush(ctx, cmd); default: - BUG(); + BUG("invalid command object type %u\n", cmd->obj); } } -- cgit v1.2.3