]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/getiopolicy_np.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / libsyscall / wrappers / getiopolicy_np.c
index e09f849cce42cc9eb38abb4201a1860fc8ac7795..01d462b4954b65187109575dd62dd237f0930ac6 100644 (file)
@@ -33,12 +33,7 @@ getiopolicy_np(int iotype, int scope)
        int policy, error;
        struct _iopol_param_t iop_param;
 
-       if ((iotype != IOPOL_TYPE_DISK && iotype != IOPOL_TYPE_VFS_ATIME_UPDATES && iotype != IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES) ||
-           (scope != IOPOL_SCOPE_PROCESS && scope != IOPOL_SCOPE_THREAD)) {
-               errno = EINVAL;
-               policy = -1;
-               goto exit;
-       }
+       /* Do not sanity check iotype and scope, leave it to kernel. */
 
        iop_param.iop_scope = scope;
        iop_param.iop_iotype = iotype;