linsysfs(4): Keep Linux compatible sysfs the same as Ubuntu

By checking Ubuntu, there is no `/sys/subsystem' in sysfs. To compatible
with Ubuntu, delete the 'subsystem' creation in Linux compatible module.

On the other hand, the sysfs `/sys/subsystem' cause failure for some
Linux udev cases. In Linux udev source code, there is a function named
`scan_devices_all', and it will scan `/sys/subsystem' if it is existed,
but now there are nothing in /sys/subsystem `, and it returns empty
to cause some use cases failed.

Reviewed by:		dchagin
Differential Revision:	https://reviews.freebsd.org/D38885
MFC after:		1 month
XMFC with:		ifAPI
This commit is contained in:
Vico Chen 2023-03-25 13:41:04 +03:00 committed by Dmitry Chagin
parent 0b56641cfc
commit 1f0c8bfd65

View File

@ -535,9 +535,6 @@ linsysfs_init(PFS_INIT_ARGS)
/* /sys/kernel/debug, mountpoint for lindebugfs. */
pfs_create_dir(kernel, "debug", NULL, NULL, NULL, 0);
/* /sys/subsystem/... */
dir = pfs_create_dir(root, "subsystem", NULL, NULL, NULL, 0);
linsysfs_net_init();
return (0);