safe_macros.c introduced a new format of error messages using the following syntax: <file>:<line> <function>(<parameters>) failed <optional extra message>
This patch will introduce this format to safe_stdio.c as well. Signed-off-by: Mats Liljegren <[email protected]> --- lib/safe_stdio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/safe_stdio.c b/lib/safe_stdio.c index b61daa5..47966c5 100644 --- a/lib/safe_stdio.c +++ b/lib/safe_stdio.c @@ -30,7 +30,8 @@ FILE *safe_fopen(const char *file, const int lineno, void (cleanup_fn)(void), if (f == NULL) { tst_brkm(TBROK | TERRNO, cleanup_fn, - "fopen(%s) failed at %s:%d", path, file, lineno); + "%s:%d: fopen(%s,%s) failed", + file, lineno, path, mode); return NULL; } @@ -46,7 +47,7 @@ int safe_fclose(const char *file, const int lineno, void (cleanup_fn)(void), if (ret) { tst_brkm(TBROK | TERRNO, cleanup_fn, - "fclose failed at %s:%d", file, lineno); + "%s:%d: fclose(%p) failed", file, lineno, f); } return ret; @@ -64,7 +65,7 @@ int safe_asprintf(const char *file, const int lineno, void (cleanup_fn)(void), if (ret < 0) { tst_brkm(TBROK | TERRNO, cleanup_fn, - "asprintf failed at %s:%d", file, lineno); + "%s:%d: asprintf(%s,...) failed", file, lineno, fmt); } return ret; -- 1.7.10.4 ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
