From patchwork Thu Jan 28 03:53:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 4968 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=178.209.37.122; helo=vps0.lunn.ch; envelope-from=andrew@lunn.ch; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=lunn.ch Received: from vps0.lunn.ch (vps0.lunn.ch [178.209.37.122]) by open-mesh.org (Postfix) with ESMTPS id 9553C81BA5 for ; Thu, 28 Jan 2016 04:53:22 +0100 (CET) Received: from andrew by vps0.lunn.ch with local (Exim 4.80) (envelope-from ) id 1aOde5-0007nT-Uw; Thu, 28 Jan 2016 04:53:21 +0100 From: Andrew Lunn To: Antonio Quartulli Date: Thu, 28 Jan 2016 04:53:13 +0100 Message-Id: <1453953196-29943-1-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 Cc: b.a.t.m.a.n@lists.open-mesh.org Subject: [B.A.T.M.A.N.] [PATCH 1/3] alfred: vis: Use debugfs_make_path helper 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: , X-List-Received-Date: Thu, 28 Jan 2016 03:53:22 -0000 By using the helper, knowledge of network namespaces can be kept to within the helper. Signed-off-by: Andrew Lunn --- vis/vis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vis/vis.c b/vis/vis.c index c1f8dad..d1640b6 100644 --- a/vis/vis.c +++ b/vis/vis.c @@ -325,7 +325,7 @@ static int parse_orig_list(struct globals *globals) char path[1024]; struct vis_list_entry *v_entry; - snprintf(path, sizeof(path), "/sys/kernel/debug/batman_adv/%s/originators", globals->interface); + debugfs_make_path(DEBUG_BATIF_PATH_FMT "/" "originators", globals->interface, path, sizeof(path)); fbuf = read_file(path); if (!fbuf) return -1;