[bug #57338] if safemode has to change fuses avrdude should exit with non-zero exit code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[bug #57338] if safemode has to change fuses avrdude should exit with non-zero exit code

Kevin Cuzner-2
URL:
  <https://savannah.nongnu.org/bugs/?57338>

                 Summary: if safemode has to change fuses avrdude should exit
with non-zero exit code
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: Sun 01 Dec 2019 11:02:58 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Britton Kerin
        Originator Email: [hidden email]
             Open/Closed: Open
                 Release: 6.3
         Discussion Lock: Any
     Programmer hardware: all
             Device type: any except AVR32, Xmega or TPI

    _______________________________________________________

Details:


There's a fuses_specified variable in main that gets initialized to zero and
never changed, and then there's this code at the end
of the fusemode recovery block:

    if (fuses_updated && fuses_specified) {
      exitrc = 1;
    }

So it looks like maybe the intention was to exit with non-zero if the user
requested a fuse change (but fuses_specified isn't getting set in this case)
but avrdude had to back it out due to fuses not being as expected.

IMO the correct thing to do is to always exit with a non-zero code if safe
mode is doing any fuse recovery at all, regardless of whether any fuse changes
were requested.  With some other patches that I'm about to submit this should
be possible because safemode shouldn't trigger when -V is used anymore.






    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57338>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/