summaryrefslogtreecommitdiff
path: root/board/avnet/fx12mm/fx12mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/avnet/fx12mm/fx12mm.c')
-rw-r--r--board/avnet/fx12mm/fx12mm.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/board/avnet/fx12mm/fx12mm.c b/board/avnet/fx12mm/fx12mm.c
index e671a7b..c975efa 100644
--- a/board/avnet/fx12mm/fx12mm.c
+++ b/board/avnet/fx12mm/fx12mm.c
@@ -32,20 +32,19 @@
int checkboard(void)
{
- char tmp[64];
- char *s, *e;
- int i = getenv_f("serial", tmp, sizeof(tmp));
+ char buf[64];
+ int i;
+ int l = getenv_f("serial#", buf, sizeof(buf));
- if (i < 0) {
+ if (l < 0) {
printf("Avnet Virtex4 FX12 with no serial #");
} else {
- for (e = tmp; *e; ++e) {
- if (*e == ' ')
+ printf("Avnet Virtex4 FX12 Minimodul # ");
+ for (i = 0; i < l; ++i) {
+ if (buf[i] == ' ')
break;
+ putc(buf[i]);
}
- printf("Avnet Virtex4 FX12 Minimodul # ");
- for (s = tmp; s < e; ++s)
- putc(*s);
}
putc('\n');
return 0;