diff options
Diffstat (limited to 'module/zcommon/zprop_common.c')
-rw-r--r-- | module/zcommon/zprop_common.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/module/zcommon/zprop_common.c b/module/zcommon/zprop_common.c index 0ce2ee762..4d856cec1 100644 --- a/module/zcommon/zprop_common.c +++ b/module/zcommon/zprop_common.c @@ -81,20 +81,8 @@ zfs_mod_supported_prop(const char *name, zfs_type_t type) #if defined(_KERNEL) || defined(LIB_ZPOOL_BUILD) return (B_TRUE); #else - struct stat64 statbuf; - char *path; - boolean_t supported = B_FALSE; - int len; - - len = asprintf(&path, "%s/%s/%s", ZFS_SYSFS_DIR, - (type == ZFS_TYPE_POOL) ? ZFS_SYSFS_POOL_PROPERTIES : - ZFS_SYSFS_DATASET_PROPERTIES, name); - - if (len > 0) { - supported = !!(stat64(path, &statbuf) == 0); - free(path); - } - return (supported); + return (zfs_mod_supported(type == ZFS_TYPE_POOL ? + ZFS_SYSFS_POOL_PROPERTIES : ZFS_SYSFS_DATASET_PROPERTIES, name)); #endif } |