diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2018-01-23 14:50:50 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2018-01-23 14:50:55 +0900 |
commit | 30602f521a85820a9f6b7ac04876400e00c68b15 (patch) | |
tree | f035a4fcc014a034f3b492886d1e8395f327fd25 /tools/stats-tool.c | |
parent | a079cfe6f815f8c69055de834d1ccbdf1fd94ba7 (diff) | |
parent | 9362752a471a5c892d679548fbf2828d5fc5684b (diff) | |
download | connman-30602f521a85820a9f6b7ac04876400e00c68b15.tar.gz connman-30602f521a85820a9f6b7ac04876400e00c68b15.tar.bz2 connman-30602f521a85820a9f6b7ac04876400e00c68b15.zip |
Updated connman to version 1.35
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
Diffstat (limited to 'tools/stats-tool.c')
-rwxr-xr-x | tools/stats-tool.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/stats-tool.c b/tools/stats-tool.c index 7d117fdc..efa39de2 100755 --- a/tools/stats-tool.c +++ b/tools/stats-tool.c @@ -794,7 +794,7 @@ static void swap_and_close_files(struct stats_file *history_file, munmap(history_file->addr, history_file->len); munmap(temp_file->addr, temp_file->len); - TFR(close(temp_file->fd)); + close(temp_file->fd); unlink(history_file->name); @@ -802,7 +802,7 @@ static void swap_and_close_files(struct stats_file *history_file, return; unlink(temp_file->name); - TFR(close(history_file->fd)); + close(history_file->fd); } static void history_file_update(struct stats_file *data_file, @@ -885,6 +885,11 @@ int main(int argc, char *argv[]) else start_ts = option_start_ts; + if (option_interval == 0) { + printf("interval cannot be zero, using the default value\n"); + option_interval = 3; + } + if (option_create > 0) stats_create(data_file, option_create, option_interval, start_ts, rec); |