mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-30 04:49:14 +03:00
Sharpen warning messages
pgm->type is an internal string that is unknown to users; in fact, even developers don't necessarily know it well. This commit replaces references to pgm->type to the more specific -c programmer (that the user provided).
This commit is contained in:
@@ -113,7 +113,7 @@ static int arduino_read_sig_bytes(const PROGRAMMER *pgm, const AVRPART *p, const
|
||||
|
||||
static int arduino_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
pgm->port = port;
|
||||
union pinfo pinfo;
|
||||
|
||||
@@ -322,7 +322,7 @@ static int avr910_parseextparms(const PROGRAMMER *pgm, const LISTID extparms) {
|
||||
|
||||
static int avr910_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
union pinfo pinfo;
|
||||
if(pgm->baudrate == 0)
|
||||
|
||||
@@ -443,9 +443,9 @@ static int buspirate_verifyconfig(const PROGRAMMER *pgm) {
|
||||
static int buspirate_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock) {
|
||||
if(str_caseeq(pgm->type, "BusPirate_BB"))
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed using -B; use -i instead\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed using -B; use -i instead\n", pgmid);
|
||||
else {
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
imsg_warning("use -x help to view alternative SPI clock options\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ static void butterfly_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
|
||||
static int butterfly_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
pgm->port = port;
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ static int ch341a_open(PROGRAMMER *pgm, const char *port) {
|
||||
}
|
||||
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ static void dryrun_disable(const PROGRAMMER *pgm) {
|
||||
|
||||
static int dryrun_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
pmsg_debug("%s(%s)\n", __func__, port? port: "NULL");
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ void flip1_initpgm(PROGRAMMER *pgm) {
|
||||
|
||||
static int flip1_open(PROGRAMMER *pgm, const char *port_spec) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
FLIP1(pgm)->dfu = dfu_open(port_spec);
|
||||
return (FLIP1(pgm)->dfu != NULL)? 0: -1;
|
||||
|
||||
@@ -179,7 +179,7 @@ void flip2_initpgm(PROGRAMMER *pgm) {
|
||||
|
||||
static int flip2_open(PROGRAMMER *pgm, const char *port_spec) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
FLIP2(pgm)->dfu = dfu_open(port_spec);
|
||||
return (FLIP2(pgm)->dfu != NULL)? 0: -1;
|
||||
|
||||
@@ -1205,7 +1205,7 @@ static int jtagmkII_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||
if(jtagmkII_set_sck_period(pgm, pgm->bitclock) != 0)
|
||||
return -1;
|
||||
} else {
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s is not known to support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -562,7 +562,7 @@ static void linuxgpio_libgpiod_display(const PROGRAMMER *pgm, const char *p) {
|
||||
|
||||
static int linuxgpio_libgpiod_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
if(bitbang_check_prerequisites(pgm) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -580,7 +580,7 @@ static int micronucleus_open(PROGRAMMER *pgm, const char *port) {
|
||||
pmsg_debug("micronucleus_open(\"%s\")\n", port);
|
||||
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
struct pdata *pdata = &my;
|
||||
const char *bus_name = NULL;
|
||||
|
||||
@@ -226,9 +226,8 @@ static void par_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
}
|
||||
|
||||
static int par_open(PROGRAMMER *pgm, const char *port) {
|
||||
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed using -B. Use -i instead\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed using -B; use -i instead\n", pgmid);
|
||||
|
||||
if(bitbang_check_prerequisites(pgm) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -221,7 +221,7 @@ static int serbb_open(PROGRAMMER *pgm, const char *port) {
|
||||
int r;
|
||||
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed using -B. Use -i instead\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed using -B; use -i instead\n", pgmid);
|
||||
|
||||
if(bitbang_check_prerequisites(pgm) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -230,7 +230,7 @@ static int serbb_open(PROGRAMMER *pgm, const char *port) {
|
||||
HANDLE hComPort = INVALID_HANDLE_VALUE;
|
||||
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed using -B. Use -i instead\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed using -B; use -i instead\n", pgmid);
|
||||
|
||||
if(bitbang_check_prerequisites(pgm) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -59,7 +59,7 @@ static void serialupdi_teardown(PROGRAMMER *pgm) {
|
||||
|
||||
static int serialupdi_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s sets its UPDI speed using -b [baudrate]. Ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s sets its UPDI speed using -b baudrate; ignoring -B\n", pgmid);
|
||||
|
||||
pgm->port = port;
|
||||
return updi_link_open(pgm);
|
||||
|
||||
@@ -861,7 +861,7 @@ static int stk500_open(PROGRAMMER *pgm, const char *port) {
|
||||
|
||||
if(pgm->bitclock) {
|
||||
if(str_eq(pgm->type, "arduino_as_isp")) // The Arduino as ISP will crash if we change the bitclock
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
else {
|
||||
if(!(pgm->extra_features & HAS_BITCLOCK_ADJ))
|
||||
pmsg_warning("setting bitclock despite HAS_BITCLOCK_ADJ missing in pgm->extra_features\n");
|
||||
|
||||
@@ -308,7 +308,7 @@ static int teensy_open(PROGRAMMER *pgm, const char *port) {
|
||||
pmsg_debug("teensy_open(\"%s\")\n", port);
|
||||
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
struct pdata *pdata = &my;
|
||||
const char *bus_name = NULL;
|
||||
|
||||
@@ -2228,7 +2228,7 @@ static void urclock_disable(const PROGRAMMER *pgm) {
|
||||
|
||||
static int urclock_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
union pinfo pinfo;
|
||||
pgm->port = port;
|
||||
|
||||
@@ -136,7 +136,7 @@ static int wiring_parseextparms(const PROGRAMMER *pgm, const LISTID extparms) {
|
||||
|
||||
static int wiring_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
int timetosnooze;
|
||||
union pinfo pinfo;
|
||||
|
||||
@@ -1417,7 +1417,7 @@ static int xbee_getsync(const PROGRAMMER *pgm) {
|
||||
|
||||
static int xbee_open(PROGRAMMER *pgm, const char *port) {
|
||||
if(pgm->bitclock)
|
||||
pmsg_warning("programmer type %s does not support adjustable bitclock speed; ignoring -B\n", pgm->type);
|
||||
pmsg_warning("-c %s does not support adjustable bitclock speed; ignoring -B\n", pgmid);
|
||||
|
||||
union pinfo pinfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user