Skip to content

Commit

Permalink
Reduce error messages to warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUdude committed Sep 1, 2023
1 parent 385f210 commit d9912f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,19 +1188,19 @@ int main(int argc, char * argv [])
if (is_serialadapter(ser)) {
if (find_serialport_adapter(&port, ser, port_tok[1]) < 0) {
if (port_tok[1][0])
pmsg_error("serial adapter %s with serial number %s not found\n", seradapter, port_tok[1]);
pmsg_warning("serial adapter %s with serial number %s not found\n", seradapter, port_tok[1]);
else
pmsg_error("serial adapter %s not found\n", seradapter);
pmsg_warning("serial adapter %s not found\n", seradapter);
}
} else {
// Port or usb vid/pid
int vid, pid;
if (sscanf(port_tok[0], "%x", &vid) > 0 && sscanf(port_tok[1], "%x", &pid) > 0) {
if(find_serialport_vid_pid(&port, vid, pid, port_tok[2]) < 0) {
if (port_tok[2][0])
pmsg_error("serial adapter with USB VID %s and PID %s and serial number %s not found\n", port_tok[0], port_tok[1], port_tok[2]);
pmsg_warning("serial adapter with USB VID %s and PID %s and serial number %s not found\n", port_tok[0], port_tok[1], port_tok[2]);
else
pmsg_error("serial adapter with USB VID %s and PID %s not found\n", port_tok[0], port_tok[1]);
pmsg_warning("serial adapter with USB VID %s and PID %s not found\n", port_tok[0], port_tok[1]);
}
}
}
Expand Down

0 comments on commit d9912f1

Please sign in to comment.