From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>
Subject: [PATCH 2/2] erofs-utils: pretty root directory progressinfo
Date: Thu, 16 May 2024 01:23:13 +0800 [thread overview]
Message-ID: <20240515172313.661530-1-hsiangkao@linux.alibaba.com> (raw)
In-Reply-To: <20240515172236.661035-1-hsiangkao@linux.alibaba.com>
Avoid `Processing ...` or `file dumped (mode 40755)`..
Signed-off-by: Gao Xiang <hsiangkao@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
prev parent reply other threads:[~2024-05-15 17:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 17:22 [PATCH 1/2] erofs-utils: correct the default number of workers in the usage Gao Xiang
2024-05-15 17:23 ` Gao Xiang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240515172313.661530-1-hsiangkao@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).