grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] UUID support for UFS


From: Javier Martín
Subject: Re: [PATCH] UUID support for UFS
Date: Tue, 21 Jul 2009 22:14:02 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

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 *printf doesn't need to
be modified.
Indeed, I didn't realise so. All that's required is a grub_inttypes header that either takes from the system stdint.h types or just defines the macros you were discussing.

 Instead we could just define somewhere:
GRUB_PRIx32 "%x"

Better yet, "x", as in libc.  That would allow for "%08x" that we need
for UUID.
Yeah, that is the format used in libc. I copied the example wrong, without the "%08"s.

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 PRId32, the impact of the subtle bugs that appear when we port across architectures will be reduced.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]