From 9cd029b5433fcd50f7c5ff2e29d70218b25cdac0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 3 Feb 2009 09:38:53 -0800 Subject: [PATCH] Remove mknod from library. This is all nowhandled in the SPL. When HAVE_GPL_ONLY_SYMBOLS is defined because the module license is set to GPL we can leverage the udev interfaces which will create the device. When HAVE_GPL_ONLY_SYMBOLS is not defined we resort to an ugly hack and the SPL invokes a usermode helper to create to missing device file for us in /dev/. Using GPL version modules is off course preperable when possible. --- lib/libzfs/libzfs_util.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index b5eb285cc1..221d97f88d 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -560,12 +560,6 @@ libzfs_init(void) return (NULL); } -#if !defined(HAVE_GPL_ONLY_SYMBOLS) - /* If we don't have access to GPL-only symbols then we may not - * use the udev APIs, therefore we must mknod the device ourselves. */ - (void)mknod(ZFS_DEV, S_IFCHR | 0600, makedev(ZFS_MAJOR, 0)); -#endif - if ((hdl->libzfs_fd = open(ZFS_DEV, O_RDWR)) < 0) { /* XXX: Allow this failure on linux systems for now. It * occurs when we attempt to open the /dev/zfs without the