more -CURRENT fixes (Olivier Houchard)

This commit is contained in:
Alan Hourihane 2001-09-17 21:21:01 +00:00
parent 861f12f19d
commit 3eb3725b0e
4 changed files with 8 additions and 8 deletions

View file

@ -1220,7 +1220,6 @@ int DRM(ioctl)( DRM_OS_IOCTL )
DRM_DEBUG( "no function\n" );
retcode = EINVAL;
} else if ( ( ioctl->root_only && DRM_OS_CHECKSUSER )
#endif /* __FreeBSD__ */
|| ( ioctl->auth_needed && !priv->authenticated ) ) {
retcode = EACCES;
} else {
@ -1416,7 +1415,7 @@ SYSUNINIT(DRM( unregister), SI_SUB_KLD, SI_ORDER_MIDDLE, linux_ioctl_unregister_
static int
DRM(linux_ioctl)(DRM_OS_STRUCTPROC *p, struct linux_ioctl_args* args)
{
#ifdef __FreeBSD_version >= 500000
#if (__FreeBSD_version >= 500000)
struct file *fp = p->td_proc->p_fd->fd_ofiles[args->fd];
#else
struct file *fp = p->p_fd->fd_ofiles[args->fd];

View file

@ -44,11 +44,12 @@
drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_OS_STRUCTPROC *p)
{
#if __FreeBSD_version >= 500021
uid_t uid = p->p_ucred->cr_svuid;
uid_t uid = p->td_proc->p_ucred->cr_svuid;
pid_t pid = p->td_proc->p_pid;
#else
uid_t uid = p->p_cred->p_svuid;
#endif
pid_t pid = p->p_pid;
#endif
drm_file_t *priv;
TAILQ_FOREACH(priv, &dev->files, link)

View file

@ -1220,7 +1220,6 @@ int DRM(ioctl)( DRM_OS_IOCTL )
DRM_DEBUG( "no function\n" );
retcode = EINVAL;
} else if ( ( ioctl->root_only && DRM_OS_CHECKSUSER )
#endif /* __FreeBSD__ */
|| ( ioctl->auth_needed && !priv->authenticated ) ) {
retcode = EACCES;
} else {
@ -1416,7 +1415,7 @@ SYSUNINIT(DRM( unregister), SI_SUB_KLD, SI_ORDER_MIDDLE, linux_ioctl_unregister_
static int
DRM(linux_ioctl)(DRM_OS_STRUCTPROC *p, struct linux_ioctl_args* args)
{
#ifdef __FreeBSD_version >= 500000
#if (__FreeBSD_version >= 500000)
struct file *fp = p->td_proc->p_fd->fd_ofiles[args->fd];
#else
struct file *fp = p->p_fd->fd_ofiles[args->fd];

View file

@ -44,11 +44,12 @@
drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_OS_STRUCTPROC *p)
{
#if __FreeBSD_version >= 500021
uid_t uid = p->p_ucred->cr_svuid;
uid_t uid = p->td_proc->p_ucred->cr_svuid;
pid_t pid = p->td_proc->p_pid;
#else
uid_t uid = p->p_cred->p_svuid;
#endif
pid_t pid = p->p_pid;
#endif
drm_file_t *priv;
TAILQ_FOREACH(priv, &dev->files, link)