From patchwork Mon Jun 21 10:06:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 239 Return-Path: Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (Postfix) with SMTP id E41BC154377 for ; Mon, 21 Jun 2010 12:06:53 +0200 (CEST) Received: (qmail invoked by alias); 21 Jun 2010 10:06:53 -0000 Received: from i59F6BC12.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [89.246.188.18] by mail.gmx.net (mp064) with SMTP; 21 Jun 2010 12:06:53 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/HABQhgMbHGGDW/HiaCiIR2qHRgT5gVmpH70oY58 Fjl/oP0apylGg5 From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 21 Jun 2010 12:06:47 +0200 Message-Id: <1277114808-16584-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH 1/2] batctl: Remove dead code from old sysfs parsing X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking 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: Mon, 21 Jun 2010 10:06:54 -0000 The old batman-adv sysfs files provided all their available options inside their output. This made it necessary to parse the output to analyse it before we accept an input given to batctl. This functionality was removed as it wasn't the correct style according to the sysfs maintainer. Not all code related to that were removed right away when batctl was adopted to the new sysfs handling. Signed-off-by: Sven Eckelmann --- functions.c | 18 ------------------ functions.h | 1 - 2 files changed, 0 insertions(+), 19 deletions(-) diff --git a/functions.c b/functions.c index 3bcb0b2..7be9511 100644 --- a/functions.c +++ b/functions.c @@ -303,21 +303,3 @@ out: close(fd); return res; } - -char *strchr_anyof(const char *s, const char *n) -{ - char *cur, *first = NULL; - size_t i, len; - - if (s == NULL || n == NULL) - return first; - - len = strlen(n); - for (i = 0; i < len; i++) { - cur = strchr(s, n[i]); - if (cur != NULL && (cur < first || first == NULL)) - first = cur; - } - - return first; -} diff --git a/functions.h b/functions.h index 847a482..885df34 100644 --- a/functions.h +++ b/functions.h @@ -35,7 +35,6 @@ char *get_name_by_macaddr(struct ether_addr *mac_addr, int read_opt); char *get_name_by_macstr(char *mac_str, int read_opt); int read_file(char *dir, char *path, int read_opt); int write_file(char *dir, char *fname, char *arg1, char *arg2); -char *strchr_anyof(const char *s, const char *n); extern char *line_ptr;