On Wed, 2015-08-12 at 13:24 +0530, Anshuman Khandual wrote:
> On 08/12/2015 12:27 PM, Michael Ellerman wrote:
> > @@ -2090,9 +2092,12 @@ static void dump_one_paca(int cpu)
> >     printf(" %-*s = %s\n", 16, "present", cpu_present(cpu) ? "yes" : "no");
> >     printf(" %-*s = %s\n", 16, "online", cpu_online(cpu) ? "yes" : "no");
> >  
> > +   i = 4; /* We always print the first four lines */
> > +
> >  #define DUMP(paca, name, format) \
> > -   printf(" %-*s = %#-*"format"\t(0x%lx)\n", 16, #name, 18, paca->name, \
> > -           offsetof(struct paca_struct, name));
> > +   if (!num_lines || i++ < num_lines)
> 
> All look good except the fact that we are using 0 to signify that
> there is no limit to the number of lines. Is not it bit confusing ?

Maybe a bit, but it's the simplest option, and it's not uncommon for zero to
mean "no limit". chage(1) springs to mind as an example.

And in terms of xmon it's hardly the most confusing part :)

cheers


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to