From patchwork Sun Nov 6 12:10:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 1355 Return-Path: Received: from nm23-vm3.bullet.mail.ukl.yahoo.com (nm23-vm3.bullet.mail.ukl.yahoo.com [217.146.177.142]) by open-mesh.org (Postfix) with SMTP id 86D516007C8 for ; Sun, 6 Nov 2011 13:10:16 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.217] by nm23.bullet.mail.ukl.yahoo.com with NNFMP; 06 Nov 2011 12:10:15 -0000 Received: from [77.238.184.74] by tm10.bullet.mail.ukl.yahoo.com with NNFMP; 06 Nov 2011 12:10:15 -0000 Received: from [127.0.0.1] by smtp143.mail.ukl.yahoo.com with NNFMP; 06 Nov 2011 12:10:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1320581415; bh=xMTLJvU7hkFSQE3YAf86nEG50A7GL6MGyUH4qyuwqbg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=B9vMjtGDYtsS0lPjMRYjgskVBQEQ1BSFVyaL3Sra1Mj4pD2JcLP86zutS8EWA25rhUr8AIixGrlSCHJnUOcsHSls/4yaNsKBt6cEZtBGJ78NWJjRVhUG010Q2m2d+H4s1qMAjqPx7hNIAc5crxuCWwaa6M4Xu54hqjaRIG4VyuM= X-Yahoo-Newman-Id: 866022.9256.bm@smtp143.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 2KYX5IgVM1k4rxTps0E3WLey1p92uShojgqGwEtYYe0NSuj suWHLrj7XaXlygUfKJRoAsAiFQlW1gWwfttt6rgS79u1phlYMKuljUONQxtG dJx_R7lr.eUoxrNQyTHA_zjiZjH2ZfNzlHLVpHB3iMLhNnWPlDyfUqlMRvWh 9cwZIxb8ZH8CZ8_GJaREKjWsoMVrzxaHr6Nq9h6Pjw28XKM0BUtZLU9xdtyV qOAlqlQL8JS8h0XUd5Hjhxb.w.2jK6vVDWmPnV2rSwuZlEO0as4W3jPb7ZrF 1IqodyPRauX.aDJUYHFL8nbq6xu8TAFiyhsi1vZEgEyRyuPwMSAwwgIQmF5i 7r6IAkK26GBD56JnfpqSft4INuVnTteTKY6lXjeAMZpdyAck- X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- Received: from localhost (lindner_marek@210.177.7.38 with plain) by smtp143.mail.ukl.yahoo.com with SMTP; 06 Nov 2011 12:10:14 +0000 GMT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 6 Nov 2011 20:10:00 +0800 Message-Id: <1320581400-8228-2-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1320581400-8228-1-git-send-email-lindner_marek@yahoo.de> References: <1320581400-8228-1-git-send-email-lindner_marek@yahoo.de> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 2/2] batctl: remove unused SINGLE_READ flag X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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: Sun, 06 Nov 2011 12:10:16 -0000 Signed-off-by: Marek Lindner --- 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("\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");