safe_mount: tolerate the realpath fails
realpath() failure is not a fatal error in safe_mount, it's safe to tolerate them.
Follow-up-fix: 3490c2842b93bbde71168d8598d06f15ea5d4010
Signed-off-by Li Wang <[email protected]>
--- lib/safe_macros.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/safe_macros.c +2 -2
@@ -905,7 +905,7 @@ int safe_mount(const char *file, const int lineno, void (*cleanup_fn)(void),"Mounting %s to %s fstyp=%s flags=%lx" , source, mpath, filesystemtype, mountflags); }else { -tst_brkm_ (file, lineno,TBROK |TERRNO , cleanup_fn, +tst_resm_ (file, lineno,TINFO |TERRNO ,"Cannot resolve the absolute path of %s" , target); }/*
@@ -962,7 +962,7 @@ int safe_umount(const char *file, const int lineno, void (*cleanup_fn)(void),if (realpath (target, mpath)) {tst_resm_ (file, lineno,TINFO ,"Umounting %s" , mpath); }else { -tst_brkm_ (file, lineno,TBROK |TERRNO , cleanup_fn, +tst_resm_ (file, lineno,TINFO |TERRNO ,"Cannot resolve the absolute path of %s" , target); }
Signature · 5 lines
2.40.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp