Check that background fsck operation is being done on a ufs filesystem.

Obtained from:	Robert Watson <rwatson@FreeBSD.org>
This commit is contained in:
Kirk McKusick 2001-03-23 20:58:25 +00:00
parent 543ee068a7
commit fca26df055

View File

@ -1799,6 +1799,8 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
if ((error = getvnode(curproc->p_fd, cmd.handle, &fp)) != 0)
return (error);
mp = ((struct vnode *)fp->f_data)->v_mount;
if (strncmp(mp->mnt_stat.f_fstypename, "ufs", MFSNAMELEN))
return (EINVAL);
if (mp->mnt_flag & MNT_RDONLY)
return (EROFS);
ump = VFSTOUFS(mp);