From 800e15d07eb52717c12720e01921bdd44a8b86d1 Mon Sep 17 00:00:00 2001 From: xiangfu Date: Thu, 25 Jun 2009 16:05:41 +0000 Subject: [PATCH] clean up the cfg error message --- inflash/src/ingenic_cfg.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/inflash/src/ingenic_cfg.c b/inflash/src/ingenic_cfg.c index b5b8801..711bb8f 100644 --- a/inflash/src/ingenic_cfg.c +++ b/inflash/src/ingenic_cfg.c @@ -133,8 +133,8 @@ int check_dump_cfg(struct hand *hand) int parse_configure(struct hand *hand, char * file_path) { if (access(file_path, F_OK)) { - fprintf(stderr, "Error - can't read file %s: %s\n", - file_path, strerror(errno)); + fprintf(stderr, "Error - can't read configure file %s.\n", + file_path); return -1; } @@ -178,11 +178,8 @@ int parse_configure(struct hand *hand, char * file_path) cfg_t *cfg; cfg = cfg_init(opts, 0); - if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR) { - fprintf(stderr, "Error - can't read file %s: %s\n", - file_path, strerror(errno)); + if (cfg_parse(cfg, file_path) == CFG_PARSE_ERROR) return -1; - } cfg_free(cfg);