Examples help messages now use argv[0] to determine their name.
MIFARE examples (mftool and mfultool) have now a better help message.
This commit is contained in:
parent
dd34bfbf75
commit
881ef6c319
5 changed files with 12 additions and 12 deletions
|
@ -96,7 +96,7 @@ bool transmit_bytes(const byte_t* pbtTx, const size_t szTxLen)
|
|||
|
||||
void print_usage(void)
|
||||
{
|
||||
printf("Usage: nfc-anticol [OPTIONS]\n");
|
||||
printf("Usage: %s [OPTIONS]\n", argv[0]);
|
||||
printf("Options:\n");
|
||||
printf("\t-h\tHelp. Print this message.\n");
|
||||
printf("\t-q\tQuiet mode. Suppress output of READER and EMULATOR data (improves timing).\n");
|
||||
|
|
|
@ -38,7 +38,7 @@ byte_t abtSak [9] = { 0x08,0xb6,0xdd };
|
|||
|
||||
void print_usage(void)
|
||||
{
|
||||
printf("Usage: nfc-emulate [OPTIONS] [UID]\n");
|
||||
printf("Usage: %s [OPTIONS] [UID]\n", argv[0]);
|
||||
printf("Options:\n");
|
||||
printf("\t-h\tHelp. Print this message.\n");
|
||||
printf("\t-q\tQuiet mode. Suppress output of READER and EMULATOR data (improves timing).\n");
|
||||
|
|
12
src/mftool.c
12
src/mftool.c
|
@ -280,12 +280,12 @@ int main(int argc, const char* argv[])
|
|||
if (argc < 4)
|
||||
{
|
||||
printf("\n");
|
||||
printf("mftool <r|w> <a|b> <dump.mfd> [<keys.mfd>]\n");
|
||||
printf("%s r|w a|b <dump.mfd> [<keys.mfd>]\n", argv[0]);
|
||||
printf("\n");
|
||||
printf("<r|w> - Perform (read from) or (write to) card\n");
|
||||
printf("<a|b> - Use A or B keys to for action\n");
|
||||
printf("<dump.mfd> - Used to write (card to file) or (file to card)\n");
|
||||
printf("<keys.mfd> - Mifare-dump that contain the keys (optional)\n");
|
||||
printf("r|w - Perform read from (r) or write to (w) card\n");
|
||||
printf("a|b - Use A or B keys for action\n");
|
||||
printf("<dump.mfd> - MiFare Dump (MFD) used to write (card to MFD) or (MFD to card)\n");
|
||||
printf("<keys.mfd> - MiFare Dump (MFD) that contain the keys (optional)\n");
|
||||
printf("\n");
|
||||
return 1;
|
||||
}
|
||||
|
@ -420,4 +420,4 @@ int main(int argc, const char* argv[])
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -108,10 +108,10 @@ int main(int argc, const char* argv[])
|
|||
if (argc < 3)
|
||||
{
|
||||
printf("\n");
|
||||
printf("mfultool <r|w> <dump.mfd>\n");
|
||||
printf("%s r|w <dump.mfd>\n", argv[0]);
|
||||
printf("\n");
|
||||
printf("<r|w> - Perform (read from) or (write to) card\n");
|
||||
printf("<dump.mfd> - Used to write (card to file) or (file to card)\n");
|
||||
printf("r|w - Perform read from or write to card\n");
|
||||
printf("<dump.mfd> - MiFare Dump (MFD) used to write (card to MFD) or (MFD to card)\n");
|
||||
printf("\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ static dev_info* pdiTag;
|
|||
|
||||
void print_usage(void)
|
||||
{
|
||||
printf("Usage: nfc-anticol [OPTIONS]\n");
|
||||
printf("Usage: %s [OPTIONS]\n", argv[0]);
|
||||
printf("Options:\n");
|
||||
printf("\t-h\tHelp. Print this message.\n");
|
||||
printf("\t-q\tQuiet mode. Suppress output of READER and EMULATOR data (improves timing).\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue