[BACK]Return to tty_ptm.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/tty_ptm.c between version 1.11 and 1.12

version 1.11, 2006/07/23 22:06:11 version 1.12, 2006/09/22 15:15:56
Line 321  ptmopen(dev_t dev, int flag, int mode, s
Line 321  ptmopen(dev_t dev, int flag, int mode, s
   
         switch(minor(dev)) {          switch(minor(dev)) {
         case 0:         /* /dev/ptmx */          case 0:         /* /dev/ptmx */
           case 2:         /* /emul/linux/dev/ptmx */
                 if ((error = pty_alloc_master(l, &fd, &dev)) != 0)                  if ((error = pty_alloc_master(l, &fd, &dev)) != 0)
                         return error;                          return error;
                   if (minor(dev) == 2) {
                           /*
                            * Linux ptyfs grants the pty right here.
                            * Handle this case here, instead of writing
                            * a new linux module.
                            */
                           if ((error = pty_grant_slave(l, dev)) != 0) {
                                   struct file *fp =
                                       fd_getfile(l->l_proc->p_fd, fd);
                                   FILE_UNUSE(fp, l);
                                   fdremove(l->l_proc->p_fd, fd);
                                   ffree(fp);
                                   return error;
                           }
                   }
                 curlwp->l_dupfd = fd;                  curlwp->l_dupfd = fd;
                 return EMOVEFD;                  return EMOVEFD;
         case 1:         /* /dev/ptm */          case 1:         /* /dev/ptm */
Line 369  ptmioctl(dev_t dev, u_long cmd, caddr_t 
Line 385  ptmioctl(dev_t dev, u_long cmd, caddr_t 
         }          }
 bad:  bad:
         fp = fd_getfile(p->p_fd, cfd);          fp = fd_getfile(p->p_fd, cfd);
           FILE_UNUSE(fp, l);
         fdremove(p->p_fd, cfd);          fdremove(p->p_fd, cfd);
         ffree(fp);          ffree(fp);
         return error;          return error;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

CVSweb <webmaster@jp.NetBSD.org>