mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Neuter linux_ustat() until somebody finds time to try to fix it.
The fundamental problem is that we get only the lower 8 bits of the minor device number so there is no guarantee that we can actually find the disk device in question at all. This was probably a bigger issue pre-GEOM where the upper bits signaled which slice were in use. The secondary problem is how we get from (partial) dev_t to vnode. The correct implementation will involve traversing the mount list looking for a perfect match or a possible match (for truncated minor).
This commit is contained in:
parent
d21456387e
commit
1e247cc2ce
1 changed files with 9 additions and 4 deletions
|
|
@ -285,16 +285,20 @@ struct l_ustat
|
|||
int
|
||||
linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (ldebug(ustat))
|
||||
printf(ARGS(ustat, "%d, *"), args->dev);
|
||||
#endif
|
||||
|
||||
return (EOPNOTSUPP);
|
||||
|
||||
#ifdef not_that_way
|
||||
struct l_ustat lu;
|
||||
struct cdev *dev;
|
||||
struct vnode *vp;
|
||||
struct statfs *stat;
|
||||
int error;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ldebug(ustat))
|
||||
printf(ARGS(ustat, "%d, *"), args->dev);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* lu.f_fname and lu.f_fpack are not used. They are always zeroed.
|
||||
|
|
@ -334,6 +338,7 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
|||
}
|
||||
|
||||
return (copyout(&lu, args->ubuf, sizeof(lu)));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
|
||||
|
|
|
|||
Loading…
Reference in a new issue