Re: [PATCH] Fix /sys to /dev node name translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 18, 2015 at 09:31:34PM +0200, Stanislav Brabec wrote:
> linux/drivers/base/core.c: device_get_devnode() defines a translation of
> '!' in sysfs nodes to '/' in /dev nodes. The same translation has to be
> done to properly support device nodes with slash (e. g. device nodes of
> cciss driver and several other drivers).

Strange feature.

> +	/* replace '!' in the name with '/', see
> +	 * linux/drivers/base/core.c: device_get_devnode() */
> +	while ((s = strchr(name, '!')))
> +		s[0] = '/';


 What about to add small inline function sysfs_fix_devname() to
 include/sysfs.h ?

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux