summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-01-14 00:13:45 +0000
committeralfred <alfred@FreeBSD.org>2002-01-14 00:13:45 +0000
commit1f82bc18d1d1e906cd9ed68039acb051fa6e11cf (patch)
treefe7842143c9585ef2ebb793d812ec71cc4488a51 /sys/dev
parentc4988e25d265bba2c63409a8c8b8708c13d8525e (diff)
downloadFreeBSD-src-1f82bc18d1d1e906cd9ed68039acb051fa6e11cf.zip
FreeBSD-src-1f82bc18d1d1e906cd9ed68039acb051fa6e11cf.tar.gz
Replace ffind_* with fget calls.
Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac.c5
-rw-r--r--sys/dev/tdfx/tdfx_pci.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 3a7c063..9d47b64 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -2582,9 +2582,8 @@ aac_linux_ioctl(struct thread *td, struct linux_ioctl_args *args)
debug_called(2);
- fp = ffind_hold(td, args->fd);
- if (fp == NULL)
- return (EBADF);
+ if ((error = fget(td, args->fd, &fp)) != 0)
+ return (error);
cmd = args->cmd;
/*
diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c
index cfbfe18..b94eedf 100644
--- a/sys/dev/tdfx/tdfx_pci.c
+++ b/sys/dev/tdfx/tdfx_pci.c
@@ -844,9 +844,8 @@ linux_ioctl_tdfx(struct thread *td, struct linux_ioctl_args* args)
struct file *fp;
- fp = ffind_hold(td, args->fd);
- if (fp == NULL)
- return (EBADF);
+ if ((error = fget(td, args->fd, &fp)) != 0)
+ return (error);
/* We simply copy the data and send it right to ioctl */
copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio));
error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td);
OpenPOWER on IntegriCloud