From 9ea7cd755f77c29d9e2854c8874a4636e1ba89a8 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Thu, 2 Jul 2009 10:31:13 +0000 Subject: [PATCH] bug #22206: avrdude: ser_setspeed(): tcsetattr() failed * ser_posix.c (ser_setspeed): Don't pass TCSAFLUSH to tcsetattr() as it apparently fails to work on Solaris. After reading the documentation again, it seems TCSAFLUSH and TCSANOW are indeed mutually exclusive. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@826 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 8 ++++++++ ser_posix.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 285983e6..8399b6eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-07-02 Joerg Wunsch + + bug #22206: avrdude: ser_setspeed(): tcsetattr() failed + * ser_posix.c (ser_setspeed): Don't pass TCSAFLUSH to tcsetattr() as + it apparently fails to work on Solaris. After reading the + documentation again, it seems TCSAFLUSH and TCSANOW are indeed + mutually exclusive. + 2009-07-02 Joerg Wunsch bug #22234: WINDOWS version: HOWTO: Specify Serial Ports Larger than COM9 diff --git a/ser_posix.c b/ser_posix.c index f7d289cb..2408f9f0 100644 --- a/ser_posix.c +++ b/ser_posix.c @@ -120,10 +120,10 @@ static int ser_setspeed(union filedescriptor *fd, long baud) cfsetospeed(&termios, speed); cfsetispeed(&termios, speed); - - rc = tcsetattr(fd->ifd, TCSANOW | TCSAFLUSH, &termios); + + rc = tcsetattr(fd->ifd, TCSANOW, &termios); if (rc < 0) { - fprintf(stderr, "%s: ser_setspeed(): tcsetattr() failed", + fprintf(stderr, "%s: ser_setspeed(): tcsetattr() failed\n", progname); return -errno; }