Mercurial > flash_v2
diff packages/redboot/current/include/redboot.h @ 1605:43a89c18d005
Add checking (assert) for size of option arrays. Also fix port for TFTP on little endian systems.
| author | gthomas |
|---|---|
| date | Fri, 23 Apr 2004 20:38:17 +0000 |
| parents | 08edfb52f9cd |
| children | 59fbd6362c2b |
line wrap: on
line diff
--- a/packages/redboot/current/include/redboot.h +++ b/packages/redboot/current/include/redboot.h @@ -9,7 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -// Copyright (C) 2002, 2003 Gary Thomas +// Copyright (C) 2002, 2003, 2004 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -295,6 +295,8 @@ struct option_info { char *name; }; +#define NUM_ELEMS(s) (sizeof(s)/sizeof(s[0])) + #define OPTION_ARG_TYPE_NUM 0 // Numeric data #define OPTION_ARG_TYPE_STR 1 // Generic string #define OPTION_ARG_TYPE_FLG 2 // Flag only
