As Colin O'Flynn wrote:

> Then there could be an option to not ask at all, and just change
> them back for batch files.

When reading about your trouble, I've also got the idea about asking
the user.

What about the following algorithm:

. if stdin is a tty, default to safemode, and if the fuses had been
  changed, ask the user about a decision upon exit; can be turned
  off using -u

. if stdin is not a tty, default to !safemode, and don't do anything
  with the fuses unless the user specified so (batch mode)

. perhaps, add an option to enable safemode if stdin is not a tty,
  but given your trouble reports, I'm not so sure about the real
  value of that feature

Question to the Win32 users: would

        if (isatty(fileno(stdin))) {
                ...
        }

work on Win32?  The Unix manuals document isatty() as being a Unix V7
function.  If that doesn't work, we'd need a different method on Win32
to detect whether standard input is a terminal.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
avrdude-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to