erofs-utils: mkfs: rearrange arguments
PATCH 1/3 erofs-utils: mkfs: rearrange arguments
1) rearrange usage();
2) rearrange argument list.
Signed-off-by Gao Xiang <[email protected]>
---
some minor cleanups.
mkfs/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
mkfs/main.c +6 -6
@@ -72,16 +72,18 @@ static void usage(void) { fputs("usage: [options] FILE DIRECTORY\n\n" "Generate erofs image from DIRECTORY to FILE, and [options] are:\n" - " -zX[,Y] X=compressor (Y=compression level, optional)\n" - " -C# specify the size of compress physical cluster in bytes\n" " -d# set output message level to # (maximum 9)\n" " -x# set xattr tolerance to # (< 0, disable xattrs; default 2)\n" + " -zX[,Y] X=compressor (Y=compression level, optional)\n" + " -C# specify the size of compress physical cluster in bytes\n" " -EX[,...] X=extended options\n" " -T# set a fixed UNIX timestamp # to all files\n" #ifdef HAVE_LIBUUID " -UX use a given filesystem UUID\n" #endif -" --chunksize=X generate chunk-based files with X-byte chunks\n" +" --all-root make all files owned by root\n" +" --chunksize=# generate chunk-based files with #-byte chunks\n" +" --compress-hints=X specify a file to configure per-file compression strategy\n" " --exclude-path=X avoid including file X (X = exact literal path)\n" " --exclude-regex=X avoid including files that match X (X = regular expression)\n" #ifdef HAVE_LIBSELINUX
@@ -89,10 +91,8 @@ static void usage(void)#endif " --force-uid=# set all file uids to # (# = UID)\n" " --force-gid=# set all file gids to # (# = GID)\n" -" --all-root make all files owned by root\n" " --help display this help and exit\n" " --max-extent-bytes=# set maximum decompressed extent size # in bytes\n" -" --compress-hints=X specify a file to configure per-file compression strategy\n" #ifndef NDEBUG" --random-pclusterblks randomize pclusterblks for big pcluster (debugging only)\n" #endif
@@ -180,7 +180,7 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])char *endptr;int opt, i; -while ((opt =getopt_long (argc, argv,"d:x:z:E:T:U:C:" , +while ((opt =getopt_long (argc, argv,"C:E:T:U:d:x:z:" , long_options,NULL )) !=-1 ) {switch (opt) {case 'z' :
Signature · 1 line
2.20.1
PATCH 2/3 erofs-utils: erofs_drop_directly_bhops for blob remapping
Easier to understand, no real impact.
Signed-off-by Gao Xiang <[email protected]>
--- lib/blobchunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/blobchunk.c +1 -1
@@ -193,7 +193,7 @@ int erofs_blob_remap(void) remapped_base =erofs_blknr (pos_out); ret =erofs_copy_file_range (fileno (blobfile), &pos_in, erofs_devfd, &pos_out, length); - bh->op = &erofs_skip_write_bhops; + bh->op = &erofs_drop_directly_bhops;erofs_bdrop (bh, false);return ret < length ? -EIO :0 ; }
Signature · 1 line
2.20.1
PATCH 3/3 erofs-utils: manpage: fix style
In reply to Gao XiangFix some style in mkfs.erofs.1
Signed-off-by Gao Xiang <[email protected]>
--- man/mkfs.erofs.1 | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
man/mkfs.erofs.1 +18 -18
@@ -63,6 +63,23 @@ Set the universally unique identifier (UUID) of the filesystem to The format of the UUID is a series of hex digits separated by hyphens, like this: "c1b9d5a2-f162-11cf-9ece-0020afc76f16". .TP +.B \-\-all-root +Make all files owned by root. +.TP +.BI "\-\-chunksize " # +Generate chunk-based files with #-byte chunks. +.TP +.BI "\-\-compress-hints " file +If the optional +.BI "\-\-compress-hints " file +argument is given, +.B mkfs.erofs +uses it to apply the per-file compression strategy. Each line is defined by +tokens separated by spaces in the following form: +.RS 1.2i +<pcluster-in-bytes> <match-pattern> +.RE +.TP .BI "\-\-exclude-path=" path Ignore file that matches the exact literal path. You may give multiple `--exclude-path' options.
@@ -80,28 +97,11 @@ Set all file uids to \fIUID\fR. .BI "\-\-force-gid=" GID Set all file gids to \fIGID\fR. .TP -.B \-\-all-root -Make all files owned by root. -.TP -.BI "\-\-chunksize " # -Generate chunk-based files with #-byte chunks. -.TP .B \-\-help Display this help and exit. .TP -.B \-\-max-extent-bytes # +.BI "\-\-max-extent-bytes " # Specify maximum decompressed extent size # in bytes. -.TP -.BI "\-\-compress-hints " file -If the optional -.BI "\-\-compress-hints " file -argument is given, -.B mkfs.erofs -uses it to apply the per-file compression strategy. Each line is defined by -tokens separated by spaces in the following form: -.RS 1.2i -<pcluster-in-bytes> <match-pattern> -.RE .SH AUTHOR This version of \fBmkfs.erofs\fR is written by Li Guifu <[email protected]>, Miao Xie <[email protected]> and Gao Xiang <[email protected]> with
Signature · 1 line
2.20.1