From: Karel Zak <kzak@redhat.com>
To: Stanislav Brabec <sbrabec@suse.cz>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] Fix /sys to /dev node name translation
Date: Tue, 19 May 2015 10:08:29 +0200 [thread overview]
Message-ID: <20150519080829.GO4834@ws.net.home> (raw)
In-Reply-To: <555A3E16.6090003@suse.cz>
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@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2015-05-19 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 19:31 [PATCH] Fix /sys to /dev node name translation Stanislav Brabec
2015-05-19 8:08 ` Karel Zak [this message]
2015-05-19 12:35 ` Stanislav Brabec
2015-05-21 11:11 ` Karel Zak
2015-05-22 13:52 ` Stanislav Brabec
2015-05-25 16:21 ` Stanislav Brabec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150519080829.GO4834@ws.net.home \
--to=kzak@redhat.com \
--cc=sbrabec@suse.cz \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox