[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.93.2.1 and 1.93.2.2

version 1.93.2.1, 2008/03/29 20:46:59 version 1.93.2.2, 2008/11/01 21:22:26
Line 15 
Line 15 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by the NetBSD  
  *      Foundation, Inc. and its contributors.  
  * 4. Neither the name of The NetBSD Foundation nor the names of its  
  *    contributors may be used to endorse or promote products derived  
  *    from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS   * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Line 228  linux_sys_fcntl(struct lwp *l, const str
Line 221  linux_sys_fcntl(struct lwp *l, const str
         file_t *fp;          file_t *fp;
         struct vnode *vp;          struct vnode *vp;
         struct vattr va;          struct vattr va;
         const struct cdevsw *cdev;  
         long pgid;          long pgid;
         struct pgrp *pgrp;          struct pgrp *pgrp;
         struct tty *tp, *(*d_tty)(dev_t);          struct tty *tp;
   
         fd = SCARG(uap, fd);          fd = SCARG(uap, fd);
         cmd = SCARG(uap, cmd);          cmd = SCARG(uap, cmd);
Line 350  linux_sys_fcntl(struct lwp *l, const str
Line 342  linux_sys_fcntl(struct lwp *l, const str
                 if (error)                  if (error)
                         return error;                          return error;
   
                 cdev = cdevsw_lookup(va.va_rdev);                  if ((tp = cdev_tty(va.va_rdev)) == NULL)
                 if (cdev == NULL)  
                         return (ENXIO);  
                 d_tty = cdev->d_tty;  
                 if (!d_tty || (!(tp = (*d_tty)(va.va_rdev))))  
                         goto not_tty;                          goto not_tty;
   
                 /* set tty pg_id appropriately */                  /* set tty pg_id appropriately */
                   mutex_enter(proc_lock);
                 if (cmd == LINUX_F_GETOWN) {                  if (cmd == LINUX_F_GETOWN) {
                         retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PGID;                          retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PGID;
                           mutex_exit(proc_lock);
                         return 0;                          return 0;
                 }                  }
                 mutex_enter(&proclist_lock);  
                 if ((long)arg <= 0) {                  if ((long)arg <= 0) {
                         pgid = -(long)arg;                          pgid = -(long)arg;
                 } else {                  } else {
Line 373  linux_sys_fcntl(struct lwp *l, const str
Line 362  linux_sys_fcntl(struct lwp *l, const str
                 }                  }
                 pgrp = pg_find(pgid, PFIND_LOCKED);                  pgrp = pg_find(pgid, PFIND_LOCKED);
                 if (pgrp == NULL || pgrp->pg_session != p->p_session) {                  if (pgrp == NULL || pgrp->pg_session != p->p_session) {
                         mutex_exit(&proclist_lock);                          mutex_exit(proc_lock);
                         return EPERM;                          return EPERM;
                 }                  }
                 tp->t_pgrp = pgrp;                  tp->t_pgrp = pgrp;
                 mutex_exit(&proclist_lock);                  mutex_exit(proc_lock);
                 return 0;                  return 0;
   
         default:          default:

Legend:
Removed from v.1.93.2.1  
changed lines
  Added in v.1.93.2.2

CVSweb <webmaster@jp.NetBSD.org>