[BACK]Return to linux_file.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / compat / linux / common

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

Diff for /src/sys/compat/linux/common/linux_file.c between version 1.37 and 1.38

version 1.37, 2001/01/22 21:31:37 version 1.38, 2001/06/14 20:32:43
Line 201  linux_sys_open(p, v, retval)
Line 201  linux_sys_open(p, v, retval)
          */           */
         if (!(fl & O_NOCTTY) && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {          if (!(fl & O_NOCTTY) && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
                 struct filedesc *fdp = p->p_fd;                  struct filedesc *fdp = p->p_fd;
                 struct file     *fp = fdp->fd_ofiles[*retval];                  struct file     *fp;
   
                   fp = fd_getfile(fdp, *retval);
   
                 /* ignore any error, just give it a try */                  /* ignore any error, just give it a try */
                 if (fp->f_type == DTYPE_VNODE)                  if (fp != NULL && fp->f_type == DTYPE_VNODE)
                         (fp->f_ops->fo_ioctl) (fp, TIOCSCTTY, (caddr_t) 0, p);                          (fp->f_ops->fo_ioctl) (fp, TIOCSCTTY, (caddr_t) 0, p);
         }          }
         return 0;          return 0;
Line 363  linux_sys_fcntl(p, v, retval)
Line 365  linux_sys_fcntl(p, v, retval)
                  * does not exist.                   * does not exist.
                  */                   */
                 fdp = p->p_fd;                  fdp = p->p_fd;
                 if ((u_int)fd >= fdp->fd_nfiles ||                  if ((fp = fd_getfile(fdp, fd)) == NULL)
                     (fp = fdp->fd_ofiles[fd]) == NULL)  
                         return EBADF;                          return EBADF;
                 if (fp->f_type == DTYPE_SOCKET) {                  if (fp->f_type == DTYPE_SOCKET) {
                         cmd = cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN;                          cmd = cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN;

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

CVSweb <webmaster@jp.NetBSD.org>