Re: [PATCH 1/2] Enable a way to provide the reason for "being here"

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

 



Marc Kleine-Budde wrote:
> [...]
> > +
> > +#include <common.h>
> > +#include <init.h>
> > +#include <environment.h>
> > +#include <globalvar.h>
> > +#include <reset_source.h>
> > +
> > +static const char name[] = "global.system.reset";
> > +static const char unknown_reset[] = "unknown";
> > +static const char power_on_reset[] = "POR";
> > +static const char manual_reset[] = "RST";
> > +static const char watchdog[] = "WDG";
> > +static const char wake[] = "WKE";
> > +static const char jtag[] = "JTAG";
>
> what about using an array
>
> static cost char *reset_reason_array[] = {
> 	[RESET_UKWN] = "unknown",
> 	...
> };

The result is not the same. The strings are no longer "const". But it should 
not make a difference from the point of view of a possible reader. Will 
change it.

> [...]

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux