From patchwork Thu Oct 25 16:22:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17556 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 24B97830F4; Thu, 25 Oct 2018 18:23:01 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="JXN48ssB"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id C9DE7830BA for ; Thu, 25 Oct 2018 18:22:57 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593D355EE7FED32DEE9F3DCBB.dip0.t-ipconnect.de [IPv6:2003:c5:93d3:55ee:7fed:32de:e9f3:dcbb]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 37BA31100DC; Thu, 25 Oct 2018 18:22:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1540484577; bh=odH4I3a9e8snnGGpMPjKjSMluO2d3l570GlgcIRPutw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JXN48ssB38MYA/n/iR/5rh34pIK1uEbVViNyivzOu0VgClvkGGHCwN5lwjurLC677 rW+/Q5YgM0Q403yEpqwtFUOFh8dqIpl+FpbmZCpBLLoDVUvZ7nVNru7n7Hjf53KkvP a9V+LcYGakEGQYiC+XzBp07GQVb3OFOI3KJzIEPA= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 25 Oct 2018 18:22:06 +0200 Message-Id: <20181025162245.19389-4-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181025162245.19389-1-sven@narfation.org> References: <20181025162245.19389-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH v3 03/42] batctl: Drop legacy vis_* related warning messages X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The vis support code was removed with batman-adv 2014.0.0 (Linux 3.13). All kernel versions with up to this version are EOL for a while and also batctl warned now about this problem for nearly 5 years. It should therefore no (serious) problem to remove these warning messages. Signed-off-by: Sven Eckelmann --- debug.c | 28 ---------------------------- debug.h | 1 - main.c | 6 ------ 3 files changed, 35 deletions(-) diff --git a/debug.c b/debug.c index 63fb633..185e26d 100644 --- a/debug.c +++ b/debug.c @@ -269,34 +269,6 @@ int debug_print_routing_algos(void) return read_file(full_path, DEBUG_ROUTING_ALGOS, 0, 0, 0, 0); } -int print_vis_info(char *mesh_iface) -{ - char full_path[MAX_PATH+1]; - char *debugfs_mnt; - FILE *fp; - - check_root_or_die("batctl vis_data"); - - debugfs_mnt = debugfs_mount(NULL); - if (!debugfs_mnt) { - fprintf(stderr, "Error - can't mount or find debugfs\n"); - return -1; - } - - debugfs_make_path(DEBUG_BATIF_PATH_FMT "/vis_data", mesh_iface, full_path, sizeof(full_path)); - fp = fopen(full_path, "r"); - if (fp) { - fclose(fp); - fprintf(stderr, "Error - batctl version is newer than kernel module - the kernel module still supports\n" - "vis, but later versions will not. The vis functionality has been moved to the userspace\n" - "daemon ''alfred''. Please either downgrade to an older (compatible) batctl version or use alfred.\n"); - } else { - fprintf(stderr, "Error - The installed batctl version and kernel module don't have vis support. The vis functionality\n" - "has been moved to the userspace daemon ''alfred''.\n"); - } - return 0; -} - static void log_usage(void) { fprintf(stderr, "Usage: batctl [options] log [parameters]\n"); diff --git a/debug.h b/debug.h index 9c57aa6..5508eaf 100644 --- a/debug.h +++ b/debug.h @@ -59,6 +59,5 @@ extern const struct debug_table_data batctl_debug_tables[BATCTL_TABLE_NUM]; int handle_debug_table(char *mesh_iface, int debug_table, int argc, char **argv); int log_print(char *mesh_iface, int argc, char **argv); int debug_print_routing_algos(void); -int print_vis_info(char *mesh_iface); #endif diff --git a/main.c b/main.c index e904a1f..3a6011b 100644 --- a/main.c +++ b/main.c @@ -175,12 +175,6 @@ int main(int argc, char **argv) ret = log_print(mesh_iface, argc - 1, argv + 1); - /* vis legacy support */ - } else if ((strcmp(argv[1], "vis_data") == 0) || (strcmp(argv[1], "vd") == 0) || - (strcmp(argv[1], "vis_mode") == 0) || (strcmp(argv[1], "vm") == 0)) { - - ret = print_vis_info(mesh_iface); - } else if ((strcmp(argv[1], "gw_mode") == 0) || (strcmp(argv[1], "gw") == 0)) { ret = handle_gw_setting(mesh_iface, argc - 1, argv + 1);