Re: [PATCH] UUID support for UFS

2009-07-22 Thread Javier Martín
El mié, 22-07-2009 a las 19:47 +0200, Robert Millan escribió: > On Tue, Jul 21, 2009 at 11:34:42PM +0200, Javier Martín wrote: > >> If int and int32_t are different types, gcc will warn about it, at least > >> for implicit conversion with data loss. > > Oh, yes... with the current build system and

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:40 +0200, Robert Millan wrote: > On Tue, Jul 21, 2009 at 03:03:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > + grub_uint32_t uuidhi; > > + grub_uint32_t uuidlow; > > [...] > > + grub_sprintf (*uuid, "%08lx%08lx", > > + (unsigned long) grub_le_to_

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:40 PM, Robert Millan wrote: > On Tue, Jul 21, 2009 at 03:03:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: >> +  grub_uint32_t uuidhi; >> +  grub_uint32_t uuidlow; >> [...] >> +      grub_sprintf (*uuid, "%08lx%08lx", >> +                 (unsigned long) grub_le_to_cpu32

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 11:34:42PM +0200, Javier Martín wrote: >> If int and int32_t are different types, gcc will warn about it, at least >> for implicit conversion with data loss. > Oh, yes... with the current build system and without -Werror, warnings > are _very_ visible. Javier, I think I

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 11:45:59PM +0200, Vladimir 'phcoder' Serbinenko wrote: > This change would allow to produce a code which is cleaner, easier to > read and understand. However I'm opposed to modifying printf function > for it. Instead we could just define somewhere: > GRUB_PRIx32 "%x" > #ifde

Re: [PATCH] UUID support for UFS

2009-07-22 Thread Robert Millan
On Tue, Jul 21, 2009 at 03:03:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: > + grub_uint32_t uuidhi; > + grub_uint32_t uuidlow; > [...] > + grub_sprintf (*uuid, "%08lx%08lx", > + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidhi), > + (unsigned long) g

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Pavel Roskin
On Tue, 2009-07-21 at 23:34 +0200, Javier Martín wrote: > > If int and int32_t are different types, gcc will warn about it, at least > > for implicit conversion with data loss. > Oh, yes... with the current build system and without -Werror, warnings > are _very_ visible. I just use make >/dev/n

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Javier Martín
Pavel Roskin escribió: On Tue, 2009-07-21 at 22:14 +0200, Javier Martín wrote: But I would prefer that we work on fixing bugs rather than non-bugs. "Fixing" this would allow us to have cleaner code, and separate "casual variables" from fixed-length variables. If we print int with %d and int3

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Pavel Roskin
On Tue, 2009-07-21 at 22:14 +0200, Javier Martín wrote: > > But I would prefer that we work on fixing bugs rather than non-bugs. > > > "Fixing" this would allow us to have cleaner code, and separate "casual > variables" from fixed-length variables. If we print int with %d and > int32_t with PRI

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Javier Martín
Pavel Roskin escribió: On Tue, 2009-07-21 at 23:45 +0200, Vladimir 'phcoder' Serbinenko wrote: This change would allow to produce a code which is cleaner, easier to read and understand. However I'm opposed to modifying printf function for it. I think Javier misspoke or didn't realize that *pr

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Pavel Roskin
On Tue, 2009-07-21 at 23:45 +0200, Vladimir 'phcoder' Serbinenko wrote: > This change would allow to produce a code which is cleaner, easier to > read and understand. However I'm opposed to modifying printf function > for it. I think Javier misspoke or didn't realize that *printf doesn't need to

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Vladimir 'phcoder' Serbinenko
On Tue, Jul 21, 2009 at 11:31 PM, Pavel Roskin wrote: > On Tue, 2009-07-21 at 20:46 +0200, Javier Martín wrote: >> Vladimir 'phcoder' Serbinenko escribió: >> > On Tue, Jul 21, 2009 at 7:14 PM, Pavel Roskin wrote: >> >> On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: >> >>> +

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Pavel Roskin
On Tue, 2009-07-21 at 20:46 +0200, Javier Martín wrote: > Vladimir 'phcoder' Serbinenko escribió: > > On Tue, Jul 21, 2009 at 7:14 PM, Pavel Roskin wrote: > >> On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: > >>> + grub_sprintf (*uuid, "%08lx%08lx", > >>> +

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Javier Martín
Vladimir 'phcoder' Serbinenko escribió: On Tue, Jul 21, 2009 at 7:14 PM, Pavel Roskin wrote: On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: + grub_sprintf (*uuid, "%08lx%08lx", + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidhi), +

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Pavel Roskin
On Tue, 2009-07-21 at 22:01 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Tue, Jul 21, 2009 at 7:14 PM, Pavel Roskin wrote: > > On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> + grub_sprintf (*uuid, "%08lx%08lx", > >> + (unsigned long) grub_le_

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Vladimir 'phcoder' Serbinenko
On Tue, Jul 21, 2009 at 7:14 PM, Pavel Roskin wrote: > On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: >> +      grub_sprintf (*uuid, "%08lx%08lx", >> +                   (unsigned long) grub_le_to_cpu32 (data->sblock.uuidhi), >> +                   (unsigned long) grub_le_t

Re: [PATCH] UUID support for UFS

2009-07-21 Thread Pavel Roskin
On Tue, 2009-07-21 at 15:03 +0200, Vladimir 'phcoder' Serbinenko wrote: > + grub_sprintf (*uuid, "%08lx%08lx", > + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidhi), > + (unsigned long) grub_le_to_cpu32 (data->sblock.uuidlow)); unsigned long is 64-bit