Am 12.01.2012 23:56, schrieb Anthony Liguori:
> On 01/12/2012 04:46 PM, Peter Maydell wrote:
> I think a reasonable thing to do is:
> 
> #define PRIp64 "0x%08" PRIx64
> 
> s:TARGET_FMT_plx:PRIp64:g

Nack, that is unreasonable naming and does not solve the issue pointed
out by Peter. PRI* should never include % or width specifier or prefix.

What we should IMO do is:

#define PRIdPLX PRId64
#define PRIxPLX PRIx64
#define PRIXPLX PRIX64
/* or TARGET_PRI*PHYS or whatever */

This can then be used as "... %02" PRIxPLX for shortened output.

And leave TARGET_FMT_plx untouched except for having it reuse PRIxPLX.

You might want to compare OpenBIOS code, where we've been through that
trouble before.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to