This commit is contained in:
Martin Holst Swende 2014-04-04 20:14:58 +02:00
commit cba867f202
2 changed files with 9 additions and 9 deletions

View file

@ -336,7 +336,7 @@ extern struct version_information version_information;
extern char *_bootphase1_version_pointer, _flash_start, _flash_end; extern char *_bootphase1_version_pointer, _flash_start, _flash_end;
void SendVersion(void) void SendVersion(void)
{ {
char temp[48]; /* Limited data payload in USB packets */ char temp[256]; /* Limited data payload in USB packets */
DbpString("Prox/RFID mark3 RFID instrument"); DbpString("Prox/RFID mark3 RFID instrument");
/* Try to find the bootrom version information. Expect to find a pointer at /* Try to find the bootrom version information. Expect to find a pointer at

View file

@ -227,27 +227,27 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers
dst[0] = 0; dst[0] = 0;
strncat(dst, prefix, len); strncat(dst, prefix, len);
if(v->magic != VERSION_INFORMATION_MAGIC) { if(v->magic != VERSION_INFORMATION_MAGIC) {
strncat(dst, "Missing/Invalid version information", len); strncat(dst, "Missing/Invalid version information", len - strlen(dst) - 1);
return; return;
} }
if(v->versionversion != 1) { if(v->versionversion != 1) {
strncat(dst, "Version information not understood", len); strncat(dst, "Version information not understood", len - strlen(dst) - 1);
return; return;
} }
if(!v->present) { if(!v->present) {
strncat(dst, "Version information not available", len); strncat(dst, "Version information not available", len - strlen(dst) - 1);
return; return;
} }
strncat(dst, v->gitversion, len); strncat(dst, v->gitversion, len - strlen(dst) - 1);
if(v->clean == 0) { if(v->clean == 0) {
strncat(dst, "-unclean", len); strncat(dst, "-unclean", len - strlen(dst) - 1);
} else if(v->clean == 2) { } else if(v->clean == 2) {
strncat(dst, "-suspect", len); strncat(dst, "-suspect", len - strlen(dst) - 1);
} }
strncat(dst, " ", len); strncat(dst, " ", len - strlen(dst) - 1);
strncat(dst, v->buildtime, len); strncat(dst, v->buildtime, len - strlen(dst) - 1);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------