From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: [B.A.T.M.A.N.] [PATCH 2/2] batctl: remove unused SINGLE_READ flag
Date: Sun, 6 Nov 2011 20:10:00 +0800 [thread overview]
Message-ID: <1320581400-8228-2-git-send-email-lindner_marek@yahoo.de> (raw)
In-Reply-To: <1320581400-8228-1-git-send-email-lindner_marek@yahoo.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
functions.h | 2 +-
sys.c | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/functions.h b/functions.h
index 90fc831..7e9f68c 100644
--- a/functions.h
+++ b/functions.h
@@ -40,7 +40,7 @@ int write_file(char *dir, char *fname, char *arg1, char *arg2);
extern char *line_ptr;
enum {
- SINGLE_READ = 0x00,
+ NO_FLAGS = 0x00,
CONT_READ = 0x01,
CLR_CONT_READ = 0x02,
USE_BAT_HOSTS = 0x04,
diff --git a/sys.c b/sys.c
index 4f2b2c5..14fc577 100644
--- a/sys.c
+++ b/sys.c
@@ -79,7 +79,7 @@ static int print_interfaces(char *mesh_iface)
while ((iface_dir = readdir(iface_base_dir)) != NULL) {
snprintf(path_buff, PATH_BUFF_LEN, SYS_MESH_IFACE_FMT, iface_dir->d_name);
- res = read_file("", path_buff, SINGLE_READ | USE_READ_BUFF | SILENCE_ERRORS, 0, 0);
+ res = read_file("", path_buff, USE_READ_BUFF | SILENCE_ERRORS, 0, 0);
if (res != EXIT_SUCCESS)
continue;
@@ -96,7 +96,7 @@ static int print_interfaces(char *mesh_iface)
line_ptr = NULL;
snprintf(path_buff, PATH_BUFF_LEN, SYS_IFACE_STATUS_FMT, iface_dir->d_name);
- res = read_file("", path_buff, SINGLE_READ | USE_READ_BUFF | SILENCE_ERRORS, 0, 0);
+ res = read_file("", path_buff, USE_READ_BUFF | SILENCE_ERRORS, 0, 0);
if (res != EXIT_SUCCESS) {
printf("<error reading status>\n");
continue;
@@ -204,7 +204,7 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
goto out;
}
- res = read_file(path_buff, SYS_LOG_LEVEL, SINGLE_READ | USE_READ_BUFF, 0, 0);
+ res = read_file(path_buff, SYS_LOG_LEVEL, USE_READ_BUFF, 0, 0);
if (res != EXIT_SUCCESS)
goto out;
@@ -300,7 +300,7 @@ int handle_sys_setting(char *mesh_iface, int argc, char **argv,
snprintf(path_buff, PATH_BUFF_LEN, SYS_BATIF_PATH_FMT, mesh_iface);
if (argc == 1) {
- res = read_file(path_buff, file_path, SINGLE_READ, 0, 0);
+ res = read_file(path_buff, file_path, NO_FLAGS, 0, 0);
goto out;
}
@@ -355,7 +355,7 @@ int handle_gw_setting(char *mesh_iface, int argc, char **argv)
snprintf(path_buff, PATH_BUFF_LEN, SYS_BATIF_PATH_FMT, mesh_iface);
if (argc == 1) {
- res = read_file(path_buff, SYS_GW_MODE, SINGLE_READ | USE_READ_BUFF, 0, 0);
+ res = read_file(path_buff, SYS_GW_MODE, USE_READ_BUFF, 0, 0);
if (res != EXIT_SUCCESS)
goto out;
@@ -375,10 +375,10 @@ int handle_gw_setting(char *mesh_iface, int argc, char **argv)
switch (gw_mode) {
case GW_MODE_CLIENT:
- res = read_file(path_buff, SYS_GW_SEL, SINGLE_READ | USE_READ_BUFF, 0, 0);
+ res = read_file(path_buff, SYS_GW_SEL, USE_READ_BUFF, 0, 0);
break;
case GW_MODE_SERVER:
- res = read_file(path_buff, SYS_GW_BW, SINGLE_READ | USE_READ_BUFF, 0, 0);
+ res = read_file(path_buff, SYS_GW_BW, USE_READ_BUFF, 0, 0);
break;
default:
printf("off\n");
--
1.7.5.4
next prev parent reply other threads:[~2011-11-06 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 12:09 [B.A.T.M.A.N.] [PATCH 1/2] batctl: version also prints the kernel module version if available Marek Lindner
2011-11-06 12:10 ` Marek Lindner [this message]
2011-11-08 17:10 ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: remove unused SINGLE_READ flag Marek Lindner
2011-11-08 17:08 ` [B.A.T.M.A.N.] [PATCH 1/2] batctl: version also prints the kernel module version if available 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=1320581400-8228-2-git-send-email-lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.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).