mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
Switch from strerror_r() to strerror() in update.c for portability
This commit is contained in:
10
src/update.c
10
src/update.c
@@ -368,13 +368,11 @@ int update_is_readable(const char *fn) {
|
|||||||
static void ioerror(const char *iotype, UPDATE *upd) {
|
static void ioerror(const char *iotype, UPDATE *upd) {
|
||||||
avrdude_message(MSG_INFO, "%s: file %s is not %s",
|
avrdude_message(MSG_INFO, "%s: file %s is not %s",
|
||||||
progname, update_outname(upd->filename), iotype);
|
progname, update_outname(upd->filename), iotype);
|
||||||
if(errno) {
|
if(errno)
|
||||||
char buf[1024];
|
avrdude_message(MSG_INFO, ". %s", strerror(errno));
|
||||||
strerror_r(errno, buf, sizeof buf);
|
else if(upd->filename && *upd->filename)
|
||||||
avrdude_message(MSG_INFO, ". %s", buf);
|
|
||||||
} else if(upd->filename && *upd->filename)
|
|
||||||
avrdude_message(MSG_INFO, " (not a regular or character file?)");
|
avrdude_message(MSG_INFO, " (not a regular or character file?)");
|
||||||
avrdude_message(MSG_INFO, "\n");
|
avrdude_message(MSG_INFO, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Basic checks to reveal serious failure before programming
|
// Basic checks to reveal serious failure before programming
|
||||||
|
Reference in New Issue
Block a user