Notify user if pgm->open() failes

This is supposed to fix issue #813
This commit is contained in:
Joerg Wunsch 2022-01-08 22:02:25 +01:00
parent a447673b07
commit a182ef5a26
1 changed files with 3 additions and 0 deletions

View File

@ -1061,6 +1061,9 @@ int main(int argc, char * argv [])
rc = pgm->open(pgm, port);
if (rc < 0) {
avrdude_message(MSG_INFO,
"%s: opening programmer \"%s\" on port \"%s\" failed\n",
progname, programmer, port);
exitrc = 1;
pgm->ppidata = 0; /* clear all bits at exit */
goto main_exit;