Patch from Chris Johns <cjohns@cybertec.com.au> to make sure the

ttyHead back link is set.
This commit is contained in:
Joel Sherrill
2000-06-29 16:05:15 +00:00
parent 1c2388c699
commit 9b6d1736ee
3 changed files with 6 additions and 3 deletions

View File

@@ -188,11 +188,12 @@ rtems_termios_open (
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
}
if (rtems_termios_ttyHead)
rtems_termios_ttyHead->back = tty;
tty->forw = rtems_termios_ttyHead;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;

View File

@@ -188,11 +188,12 @@ rtems_termios_open (
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
}
if (rtems_termios_ttyHead)
rtems_termios_ttyHead->back = tty;
tty->forw = rtems_termios_ttyHead;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;