From patchwork Thu Sep 22 21:46:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16699 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 19FE4818D8; Thu, 22 Sep 2016 23:46:14 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=xoIGnBq9; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 5C98481298 for ; Thu, 22 Sep 2016 23:46:11 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593C1DCFD57218A74145549B9.dip0.t-ipconnect.de [IPv6:2003:c5:93c1:dcfd:5721:8a74:1455:49b9]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 5257B1C8001; Thu, 22 Sep 2016 23:46:10 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1474580770; bh=gtktio0msYzVI3LPdUx7/eT4zB9GRYgZLGrITmjkPdU=; h=From:To:Cc:Subject:Date:From; b=xoIGnBq9MEPaoiE9NotNKjgvSS0qnbTDRN8wuc7B0qlxE4IFZWEYUuximM3ewMjFX llduOc7yVpfvM+G582o4S/rP5/wgQ09QOccqiJiSKDnLaC9ij9vSbpgjDwV3XlyLST D1/aAm3vkI3mZ0rdc/0rdUupW14ChTX24JiVox84= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 22 Sep 2016 23:46:07 +0200 Message-Id: <20160922214607.22123-1-sven@narfation.org> X-Mailer: git-send-email 2.9.3 Subject: [B.A.T.M.A.N.] [PATCH] alfred: vis: Fix netlink function fallback X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 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 netlink functions return -EOPNOTSUPP when the kernel doesn't support the netlink command. The caller can then fall back to debugfs. So check for -EOPNOTSUPP and not EOPNOTSUPP. Fixes: bca55a86fecd ("alfred: vis: Add support for netlink") Signed-off-by: Sven Eckelmann --- vis/vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vis/vis.c b/vis/vis.c index b865508..677f8aa 100644 --- a/vis/vis.c +++ b/vis/vis.c @@ -361,7 +361,7 @@ static int parse_transtable_local(struct globals *globals) int ret; ret = parse_transtable_local_netlink(globals); - if (ret != EOPNOTSUPP) + if (ret != -EOPNOTSUPP) return ret; return parse_transtable_local_debugfs(globals); @@ -602,7 +602,7 @@ static int parse_orig_list(struct globals *globals) int ret; ret = parse_orig_list_netlink(globals); - if (ret != EOPNOTSUPP) + if (ret != -EOPNOTSUPP) return ret; return parse_orig_list_debugfs(globals);