From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 1/2] batctl: Remove dead code from old sysfs parsing
Date: Mon, 21 Jun 2010 12:06:47 +0200 [thread overview]
Message-ID: <1277114808-16584-1-git-send-email-sven.eckelmann@gmx.de> (raw)
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 <sven.eckelmann@gmx.de>
---
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;
--
1.7.1
next reply other threads:[~2010-06-21 10:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 10:06 Sven Eckelmann [this message]
2010-06-21 10:06 ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: Use NULL instead of 0 for pointers Sven Eckelmann
2010-06-21 13:22 ` [B.A.T.M.A.N.] [PATCH 1/2] batctl: Remove dead code from old sysfs parsing Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1277114808-16584-1-git-send-email-sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).