[PATCH v2] erofs-utils: adjust volume label maximum length to the kernel implementation
Naoto Yamaguchi
wata2ki at gmail.com
Fri Aug 16 00:02:05 AEST 2024
Hi Gao.
> > ---
> > mkfs/main.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mkfs/main.c b/mkfs/main.c
> > index b7129eb..ff26c16 100644
> > --- a/mkfs/main.c
> > +++ b/mkfs/main.c
> > @@ -151,7 +151,7 @@ static void usage(int argc, char **argv)
> > printf(
> > " -C# specify the size of compress physical cluster in bytes\n"
> > " -EX[,...] X=extended options\n"
> > - " -L volume-label set the volume label (maximum 16)\n"
> > + " -L volume-label set the volume label (maximum 15 character)\n"
>
> 15 character might be ambiguous here, since there could be other encodings I guess?
I propose to...
Solution 1.
-L volume-label set the volume label (maximum 15 ASCII character)
Solution 2.
-L volume-label set the volume label (maximum 15 bytes)
Solution 3. similar to tune2fs
-L volume-label set the volume label
and
erofs_err("Warning: label too long, truncating.");
with truncating input string to 15 bytes.
Which is better? Could you feedback?
Thanks.
Naoto Yamaguchi @ AGL community.
More information about the Linux-erofs
mailing list