Avoid `Processing ...` or `file dumped (mode 40755)`.. Signed-off-by: Gao Xiang <hsiang...@linux.alibaba.com> --- lib/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/inode.c b/lib/inode.c index 8ec87e6..67a572d 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -1405,10 +1405,11 @@ static int erofs_rebuild_handle_directory(struct erofs_inode *dir) static int erofs_mkfs_handle_inode(struct erofs_inode *inode) { + const char *relpath = erofs_fspath(inode->i_srcpath); char *trimmed; int ret; - trimmed = erofs_trim_for_progressinfo(erofs_fspath(inode->i_srcpath), + trimmed = erofs_trim_for_progressinfo(relpath[0] ? relpath : "/", sizeof("Processing ...") - 1); erofs_update_progressinfo("Processing %s ...", trimmed); free(trimmed); @@ -1442,8 +1443,7 @@ static int erofs_mkfs_handle_inode(struct erofs_inode *inode) } else { ret = erofs_mkfs_handle_directory(inode); } - erofs_info("file %s dumped (mode %05o)", erofs_fspath(inode->i_srcpath), - inode->i_mode); + erofs_info("file /%s dumped (mode %05o)", relpath, inode->i_mode); return ret; } -- 2.39.3