From: Kees Cook <kees@outflux.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: work-around for video4linux sysfs
Date: Thu, 02 Aug 2007 14:05:02 +0000 [thread overview]
Message-ID: <20070802140501.GS9617@outflux.net> (raw)
In-Reply-To: <20070731195136.GW9881@outflux.net>
Hi Kay,
On Thu, Aug 02, 2007 at 11:24:08AM +0200, Kay Sievers wrote:
> We will not create any persistent links which contain simple
> enumeration or driver names. That just doesn't make sense. Driver
> names are kernel implementation details that are free to change any
> time, you can match on them with rules, but not put them into
> persistent link names.
This doesn't seem consistent with things I saw in /dev/disk/by-path,
but I'm totally open to suggestions for /dev/v4l. e.g.:
pci-0000:00:0e.0-scsi-0:0:0:0-part1
^driver
^simple enumeration
Things like the hda/sda swap for SATA changed the driver name here,
so I don't think it's unreasonable to use a driver name as part of
the symlink. The simple enumeration in this case is based on physical
characteristics of the device, which I can see as being different from
the per-driver v4l enumeration.
Note, however, that my proposed code does not use the per-driver
enumeration because there was no way to access it reliably. The
proposed code produces a tree like so:
/dev/v4l
`-- by-path
|-- pci-0000:01:06.0-cx8800 -> ../../video0
`-- pci-0000:01:07.0-ivtv -> ../../video1
> Also the enumeration number appended to the end of the name creates
> more problem than is solves, because it again depends on discovery
> order of the device, which can also change at any time.
AFAIK, the v4l per-driver enumeration has a fixed order (i.e. ivtv0,
ivtv1). (The general v4l device enumeration is not -- video0, video1).
Again, I just want a unique identifier for the v4l devices, and was
offering a working code example. Without the driver-name-fetching, the
path-id output had this ugly trailing "-", which seemed to be calling
for more stuff to be put after it. (e.g. "pci-0000:01:06.0-")
I have no problem changing it to be more in line with what you'd like
to see; I just want to solve the problem. :) Can you make some
suggestions on what a clean solution would look like?
--
Kees Cook @outflux.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2007-08-02 14:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 19:51 work-around for video4linux sysfs Kees Cook
2007-08-01 20:52 ` Greg KH
2007-08-01 21:31 ` Kees Cook
2007-08-01 21:58 ` Greg KH
2007-08-01 22:22 ` Kees Cook
2007-08-01 22:39 ` Greg KH
2007-08-01 23:14 ` Kees Cook
2007-08-01 23:28 ` Greg KH
2007-08-01 23:48 ` Kees Cook
2007-08-02 9:24 ` Kay Sievers
2007-08-02 14:05 ` Kees Cook [this message]
2007-08-02 22:30 ` Kay Sievers
2007-08-02 22:39 ` Linas Vepstas
2007-08-02 23:02 ` Kay Sievers
2007-08-07 0:39 ` Kees Cook
2007-08-07 9:24 ` Kay Sievers
2007-08-07 19:36 ` Kees Cook
2007-08-07 22:58 ` Kay Sievers
2007-08-07 23:18 ` Kees Cook
2007-08-08 10:48 ` Kay Sievers
2007-08-09 19:38 ` Kees Cook
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=20070802140501.GS9617@outflux.net \
--to=kees@outflux.net \
--cc=linux-hotplug@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.