Improve terminal dump usage message

This commit is contained in:
Stefan Rueger 2022-07-12 11:47:33 +01:00
parent 602e9bb80c
commit 92425af0cc
1 changed files with 9 additions and 7 deletions

View File

@ -232,12 +232,14 @@ static int hexdump_buf(FILE * f, int startaddr, unsigned char * buf, int len)
static int cmd_dump(PROGRAMMER * pgm, struct avrpart * p,
int argc, char * argv[])
{
if (argc < 2) {
avrdude_message(MSG_INFO, "Usage: %s <memtype> [<start addr> <len>]\n"
" %s <memtype> [<start addr> <...>]\n"
" %s <memtype> <...>\n"
" %s <memtype>\n",
argv[0], argv[0], argv[0], argv[0]);
if (argc < 2 || argc > 4) {
avrdude_message(MSG_INFO,
"Usage: %s <memory> <addr> <len>\n"
" %s <memory> <addr> ...\n"
" %s <memory> <addr>\n"
" %s <memory> ...\n"
" %s <memory>\n",
argv[0], argv[0], argv[0], argv[0], argv[0]);
return -1;
}