ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] Как раздавать имена устройствам в /dev?
Date: Wed, 19 Sep 2012 14:24:32 +0400
Message-ID: <20120919102432.GA7366@newmaster.mivlgu.local> (raw)
In-Reply-To: <k3aia6$r18$2@ger.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

On Tue, Sep 18, 2012 at 11:33:26PM +0400, Alexei V. Mezin wrote:
> 18.09.2012 23:30, Alexei V. Mezin пишет:
> >
> > Было написано когда-то правило
> 
> Выглядело так:
> 
> [alexei@bigbear ~]$ cat /etc/udev/rules.d/96-videodev.rules
> # TV tuner
> KERNEL=="video*", SYSFS{vendor}=="0x109e", SYSFS{device}=="0x036e", SYMLINK+="video/bttv"
> # MS webcam
> KERNEL=="video*", SYSFS{vendor}=="0x045e", SYSFS{device}=="0x0766", SYMLINK+="video/webcam"

SYSFS давно пора заменить на ATTRS, тогда и правила могут опять
заработать.  Хотя второе правило всё равно записано неверно - для USB
имена и значения атрибутов немного другие:

KERNEL=="video*", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0766", SYMLINK+="video/webcam"

(т.е., idVendor/idProduct и без "0x").

Ну и сейчас есть /lib/udev/rules.d/60-persistent-v4l.rules, где создаются
ссылки /dev/v4l/by-id/*, /dev/v4l/by-path/* - возможно, они годятся и без
дополнительных правил (by-id привязывается к серийному номеру
USB-устройства, by-path - к PCI-слоту или USB-порту).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2012-09-19 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 19:30 Alexei V. Mezin
2012-09-18 19:33 ` Alexei V. Mezin
2012-09-19 10:24   ` Sergey Vlasov [this message]
2012-09-19 19:51     ` Alexei V. Mezin

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=20120919102432.GA7366@newmaster.mivlgu.local \
    --to=vsu@altlinux.ru \
    --cc=sisyphus@lists.altlinux.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

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git