Re: [PATCH v5 01/16] partmap/gpt: Add grub_gpt_partition_get_uuid()

2023-08-23 Thread Vitaly Kuzmichev
Hi Vladimir, On Wed, 2023-08-23 at 00:02 +0200, Vladimir 'phcoder' Serbinenko wrote: > > > > > +       { > > +         disk = grub_disk_open (dev->disk->name); > > +         if (disk && grub_disk_read (disk, pt->offset, pt->index, > > +                                     sizeof (gptdata), &gptd

Re: [PATCH v5 06/16] include/grub/charset.h: Enhance grub_utf16_to_utf8()

2023-08-23 Thread Vitaly Kuzmichev
Hi Vladimir, On Tue, 2023-08-22 at 23:55 +0200, Vladimir 'phcoder' Serbinenko wrote: > > > > > > > diff --git a/include/grub/charset.h b/include/grub/charset.h > > index 31a3b52dd..635d6df9e 100644 > > --- a/include/grub/charset.h > > +++ b/include/grub/charset.h > > @@ -49,6 +49,13 @@ > >  #de

Re: [PATCH v5 16/16] fs/ntfs: Simplify to use grub_utf16_to_utf8_alloc()

2023-08-23 Thread Vitaly Kuzmichev
Hi Vladimir, On Tue, 2023-08-22 at 23:48 +0200, Vladimir 'phcoder' Serbinenko wrote: > Would it be easier to change all call sites to use > utf16_to_utf8_alloc? Please note that grub_utf16_to_utf8_alloc and grub_utf16_to_utf8 are both inline. There are 3 invocations of get_utf8 function in ntfs m

Re: [PATCH v5 01/16] partmap/gpt: Add grub_gpt_partition_get_uuid()

2023-08-23 Thread Vladimir 'phcoder' Serbinenko
Le mer. 23 août 2023, 13:55, Vitaly Kuzmichev a écrit : > Hi Vladimir, > > On Wed, 2023-08-23 at 00:02 +0200, Vladimir 'phcoder' Serbinenko wrote: > > > > > > > > + { > > > + disk = grub_disk_open (dev->disk->name); > > > + if (disk && grub_disk_read (disk, pt->offset, pt->i

Re: [PATCH v5 16/16] fs/ntfs: Simplify to use grub_utf16_to_utf8_alloc()

2023-08-23 Thread Vladimir 'phcoder' Serbinenko
Le mer. 23 août 2023, 14:20, Vitaly Kuzmichev a écrit : > Hi Vladimir, > > On Tue, 2023-08-22 at 23:48 +0200, Vladimir 'phcoder' Serbinenko wrote: > > Would it be easier to change all call sites to use > > utf16_to_utf8_alloc? > > Please note that grub_utf16_to_utf8_alloc and grub_utf16_to_utf8 a

Re: [PATCH v5 15/16] fs/iso9660: Simplify to use grub_utf16_to_utf8_alloc()

2023-08-23 Thread Vitaly Kuzmichev
Hi Vladimir, On Tue, 2023-08-22 at 23:49 +0200, Vladimir 'phcoder' Serbinenko wrote: > Maybe change all call sites and eliminate this function altogether? Same problem here as in ntfs module. We have 2 invocations of grub_iso9660_convert_string in the module, so this would increase module size b

Re: [PATCH v5 15/16] fs/iso9660: Simplify to use grub_utf16_to_utf8_alloc()

2023-08-23 Thread Vladimir 'phcoder' Serbinenko
Le mer. 23 août 2023, 14:34, Vitaly Kuzmichev a écrit : > Hi Vladimir, > > On Tue, 2023-08-22 at 23:49 +0200, Vladimir 'phcoder' Serbinenko wrote: > > Maybe change all call sites and eliminate this function altogether? > > > Same problem here as in ntfs module. We have 2 invocations of > grub_iso

Re: [PATCH v5 13/16] fs/f2fs: Simplify to use grub_utf16_to_utf8_alloc()

2023-08-23 Thread Vitaly Kuzmichev
Hi Vladimir, On Tue, 2023-08-22 at 23:56 +0200, Vladimir 'phcoder' Serbinenko wrote: > Same as other similar patches: maybe change call sites and remove > function altogether? Yes, for f2fs module we can do this. There is only one usage of the function grub_f2fs_utf16_to_utf8, so no code duplicat