Re: [patch v3] PS3: Fix printing of os-area magic numbers

2007-12-23 Thread Geoff Levand
On 12/23/2007 01:51 AM, Geert Uytterhoeven wrote: > On Sat, 22 Dec 2007, Geoff Levand wrote: >> +static void dump_field(char *s, const u8 *f, unsigned int size) >> +{ >> +#if defined(DEBUG) >> +unsigned int i; >> + >> +for (i = 0; i < size; i++) >> +s[i] = isprint(f[i]) ? f[i] :

Re: [patch v3] PS3: Fix printing of os-area magic numbers

2007-12-23 Thread Geert Uytterhoeven
On Sat, 22 Dec 2007, Geoff Levand wrote: > +static void dump_field(char *s, const u8 *f, unsigned int size) > +{ > +#if defined(DEBUG) > + unsigned int i; > + > + for (i = 0; i < size; i++) > + s[i] = isprint(f[i]) ? f[i] : '.'; > + s[i] = 0; > +#endif > +} Sorry for nitpic

[patch v3] PS3: Fix printing of os-area magic numbers

2007-12-22 Thread Geoff Levand
Fix a bug in the printing of the os-area magic numbers which assumed that magic numbers were zero terminated strings. The magic numbers are represented in memory as integers. If the os-area sections are not initialized correctly they could contained random data that would be printed to the displa