@@ -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,
@@ -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");