Changeset 30ba752 in rtems


Ignore:
Timestamp:
Sep 21, 1998, 12:01:26 AM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
04bc5d9
Parents:
6bd0fe4
Message:

Patch from Eric Norum:

I fixed the problems noted by Victor Vengerov.

1) Fix typo in cfsetispeed().
2) In rtems_termios_open, ensure that args->iop->data1 is set before calling
device-specific open routine.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/termios.c

    r6bd0fe4 r30ba752  
    287287
    288288                /*
    289                  * Device-specific open
    290                  */
    291                 if (tty->device.firstOpen)
    292                         (*tty->device.firstOpen)(major, minor, arg);
    293 
    294                 /*
    295289                 * Bump name characer
    296290                 */
     
    298292                        c = 'a';
    299293        }
    300         tty->refcount++;
    301294        args->iop->data1 = tty;
     295        if (!tty->refcount++ && tty->device.firstOpen)
     296                (*tty->device.firstOpen)(major, minor, arg);
    302297        rtems_semaphore_release (ttyMutex);
    303298        return RTEMS_SUCCESSFUL;
  • c/src/lib/libc/cfiospeed.c

    r6bd0fe4 r30ba752  
    4848                return -1;
    4949        }
    50         tp->c_cflag = (tp->c_cflag & ~CBAUD) | (speed * (CIBAUD / CBAUD));
     50        tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
    5151        return 0;
    5252}
  • c/src/lib/libc/termios.c

    r6bd0fe4 r30ba752  
    287287
    288288                /*
    289                  * Device-specific open
    290                  */
    291                 if (tty->device.firstOpen)
    292                         (*tty->device.firstOpen)(major, minor, arg);
    293 
    294                 /*
    295289                 * Bump name characer
    296290                 */
     
    298292                        c = 'a';
    299293        }
    300         tty->refcount++;
    301294        args->iop->data1 = tty;
     295        if (!tty->refcount++ && tty->device.firstOpen)
     296                (*tty->device.firstOpen)(major, minor, arg);
    302297        rtems_semaphore_release (ttyMutex);
    303298        return RTEMS_SUCCESSFUL;
  • cpukit/libcsupport/src/termios.c

    r6bd0fe4 r30ba752  
    287287
    288288                /*
    289                  * Device-specific open
    290                  */
    291                 if (tty->device.firstOpen)
    292                         (*tty->device.firstOpen)(major, minor, arg);
    293 
    294                 /*
    295289                 * Bump name characer
    296290                 */
     
    298292                        c = 'a';
    299293        }
    300         tty->refcount++;
    301294        args->iop->data1 = tty;
     295        if (!tty->refcount++ && tty->device.firstOpen)
     296                (*tty->device.firstOpen)(major, minor, arg);
    302297        rtems_semaphore_release (ttyMutex);
    303298        return RTEMS_SUCCESSFUL;
Note: See TracChangeset for help on using the changeset viewer.