int kdb_register(kdbtab_t *cmd)
{
	kdbtab_t *kp;

	list_for_each_entry(kp, &kdb_cmds_head, list_node) {
		if (strcmp(kp->name, cmd->name) == 0) {
			kdb_printf("Duplicate kdb cmd: %s, func %p help %s\n",
				   cmd->name, cmd->func, cmd->help);
			return 1;
		}
	}

	list_add_tail(&cmd->list_node, &kdb_cmds_head);
	return 0;
}
int kdb_register(kdbtab_t *cmd)
{
	kdbtab_t *kp;

	list_for_each_entry(kp, &kdb_cmds_head, list_node) {
		if (strcmp(kp->name, cmd->name) == 0) {
			kdb_printf("Duplicate kdb cmd: %s, func %p help %s\n",
				   cmd->name, cmd->func, cmd->help);
			return 1;
		}
	}

	list_add_tail(&cmd->list_node, &kdb_cmds_head);
	return 0;
}