mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
rework start screen to be shorter
This commit is contained in:
parent
2671795b8b
commit
652affbfb1
5 changed files with 218 additions and 3 deletions
|
@ -53,6 +53,27 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers
|
|||
strncat(dst, v->armsrc, len - strlen(dst) - 1);
|
||||
}
|
||||
|
||||
void format_version_information_short(char *dst, int len, void *version_info) {
|
||||
struct version_information_t *v = (struct version_information_t *)version_info;
|
||||
dst[0] = 0;
|
||||
if (v->magic != VERSION_INFORMATION_MAGIC) {
|
||||
strncat(dst, "Missing/Invalid version information", len - strlen(dst) - 1);
|
||||
return;
|
||||
}
|
||||
if (v->versionversion != 1) {
|
||||
strncat(dst, "Version information not understood", len - strlen(dst) - 1);
|
||||
return;
|
||||
}
|
||||
if (!v->present) {
|
||||
strncat(dst, "Version information not available", len - strlen(dst) - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
strncat(dst, v->gitversion, len - strlen(dst) - 1);
|
||||
strncat(dst, " ", len - strlen(dst) - 1);
|
||||
strncat(dst, v->buildtime, len - strlen(dst) - 1);
|
||||
}
|
||||
|
||||
/*
|
||||
ref http://www.csm.ornl.gov/~dunigan/crc.html
|
||||
Returns the value v with the bottom b [0,32] bits reflected.
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
extern struct version_information_t g_version_information;
|
||||
void FormatVersionInformation(char *dst, int len, const char *prefix, void *version_info);
|
||||
void format_version_information_short(char *dst, int len, void *version_info);
|
||||
|
||||
uint32_t reflect(uint32_t v, int b); // used in crc.c ...
|
||||
uint8_t reflect8(uint8_t b); // dedicated 8bit reversal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue