2007-08-10 14:36:59 +04:00
# do not edit this file, it will be overwritten on update
2008-10-07 02:18:55 +04:00
SUBSYSTEM=="block", SYMLINK+="block/%M:%m"
SUBSYSTEM!="block", SYMLINK+="char/%M:%m"
2008-12-22 18:15:37 +03:00
KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660"
KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660"
KERNEL=="ptmx", GROUP="tty", MODE="0666"
KERNEL=="tty", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
KERNEL=="console", MODE="0600"
2009-05-03 16:44:23 +04:00
KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty"
2007-08-10 14:36:59 +04:00
# serial
2009-04-28 13:24:25 +04:00
KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
2009-05-04 16:10:05 +04:00
KERNEL=="ppp", MODE="0600"
2009-01-04 19:01:47 +03:00
KERNEL=="mwave", NAME="modems/mwave", GROUP="dialout"
KERNEL=="hvc*|hvsi*", GROUP="dialout"
2007-08-10 14:36:59 +04:00
# mem
2007-08-25 16:07:02 +04:00
KERNEL=="null|zero|full|random|urandom", MODE="0666"
2008-08-11 12:34:18 +04:00
KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640"
2007-08-10 14:36:59 +04:00
# input
KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640"
2008-12-21 15:01:40 +03:00
KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0640"
KERNEL=="js[0-9]*", NAME="input/%k", MODE="0644"
2007-08-10 14:36:59 +04:00
# video4linux
2008-11-19 23:47:07 +03:00
SUBSYSTEM=="video4linux", GROUP="video"
KERNEL=="vttuner*", GROUP="video"
KERNEL=="vtx*|vbi*", GROUP="video"
KERNEL=="winradio*", GROUP="video"
2007-08-10 14:36:59 +04:00
# graphics
2008-11-19 23:47:07 +03:00
KERNEL=="agpgart", MODE="0600", GROUP="video"
2008-12-21 15:01:40 +03:00
KERNEL=="card[0-9]*", NAME="dri/%k"
2008-11-19 23:47:07 +03:00
KERNEL=="pmu", GROUP="video"
KERNEL=="nvidia*|nvidiactl*", GROUP="video"
SUBSYSTEM=="graphics", GROUP="video"
2009-01-15 19:06:14 +03:00
SUBSYSTEM=="drm", GROUP="video"
2007-08-10 14:36:59 +04:00
2009-01-04 00:30:05 +03:00
# DVB (video)
SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video"
2007-08-10 14:36:59 +04:00
rules: set group ownership of new firewire driver device files
The newer firewire-core driver exposes per-device character device files,
called /dev/fw[0-9]*, in contrast to the older raw1394, video1394, dv1394
drivers which created one global file or per-controller files.
This allows to set ownership, permissions, or/ and access control lists
for each device file based on device type markers obtained from sysfs.
The "units" attribute which is used for this purpose has become available
in Linux 2.6.31(-rc1) by commit 0210b66dd88a2a1e451901b00378a2068b6ccb35.
The added rules match identifiers of
- IIDC devices:
industrial cameras and some webcams,
- AV/C devices:
camcorders, set-top boxes, TV sets, audio devices, and similar
devices.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-07-01 23:41:43 +04:00
# FireWire (dv1394 and video1394 drivers)
2009-05-05 14:43:42 +04:00
KERNEL=="dv1394-[0-9]*", NAME="dv1394/%n", GROUP="video"
KERNEL=="video1394-[0-9]*", NAME="video1394/%n", GROUP="video"
rules: set group ownership of new firewire driver device files
The newer firewire-core driver exposes per-device character device files,
called /dev/fw[0-9]*, in contrast to the older raw1394, video1394, dv1394
drivers which created one global file or per-controller files.
This allows to set ownership, permissions, or/ and access control lists
for each device file based on device type markers obtained from sysfs.
The "units" attribute which is used for this purpose has become available
in Linux 2.6.31(-rc1) by commit 0210b66dd88a2a1e451901b00378a2068b6ccb35.
The added rules match identifiers of
- IIDC devices:
industrial cameras and some webcams,
- AV/C devices:
camcorders, set-top boxes, TV sets, audio devices, and similar
devices.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-07-01 23:41:43 +04:00
# FireWire (firewire-core driver: IIDC devices, AV/C devices)
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video"
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
2007-08-10 14:36:59 +04:00
# libusb device nodes
2008-12-21 15:01:40 +03:00
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664"
2007-08-10 14:36:59 +04:00
# printer
KERNEL=="parport[0-9]*", GROUP="lp"
SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
2008-12-21 15:01:40 +03:00
SUBSYSTEM=="ppdev", GROUP="lp"
2007-08-10 14:36:59 +04:00
SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
2008-12-21 15:17:37 +03:00
KERNEL=="lp[0-9]*", GROUP="lp"
2007-08-10 14:36:59 +04:00
KERNEL=="irlpt[0-9]*", GROUP="lp"
2009-01-05 14:34:55 +03:00
# block
SUBSYSTEM=="block", GROUP="disk"
2009-01-03 18:25:15 +03:00
# floppy
2009-01-05 14:34:55 +03:00
KERNEL=="fd[0-9]", GROUP="floppy"
2009-01-03 18:25:15 +03:00
KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"
2009-01-05 14:34:55 +03:00
KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
2009-01-03 18:25:15 +03:00
# cdrom
2009-01-03 17:50:17 +03:00
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
2009-01-10 19:44:09 +03:00
SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom"
2009-05-22 18:44:53 +04:00
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
2009-01-05 14:34:55 +03:00
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom"
2009-01-03 18:25:15 +03:00
# tape
KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
2009-05-22 18:44:53 +04:00
SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
2009-01-03 18:25:15 +03:00
2009-01-05 14:34:55 +03:00
# block-releated
KERNEL=="sch[0-9]*", GROUP="disk"
2009-05-22 18:44:53 +04:00
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
2009-01-05 14:34:55 +03:00
KERNEL=="pg[0-9]*", GROUP="disk"
2007-08-10 14:36:59 +04:00
KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
rules: provide /dev/raw/rawctl
On Fri, Dec 26, 2008 at 01:26, Karel Zak <kzak@redhat.com> wrote:
> On Fri, Dec 26, 2008 at 12:39:16AM +0100, Kay Sievers wrote:
>> On Fri, Dec 26, 2008 at 00:26, Karel Zak <kzak@redhat.com> wrote:
>> > The upstream raw(8) command supports /dev/rawctl and also
>> > /dev/raw/rawctl. I think it makes more sense to use raw/rawctl when
>> > you have all your raw devices in raw/ subdirectory (e.g. /dev/raw/raw<N>).
>>
>> The raw tool looks for /dev/rawctl first and the fallback to
>> /dev/raw/rawctl is named DEVFS_*. Should we turn that order around and
>> remove the devfs notion from the raw tool and let udev create a
>> dev/raw/rawctl node?
>
> Yeah. Fixed, committed and pushed.
>
> $ strace -e open ./raw
> open("/dev/raw/rawctl", O_RDWR) = -1 ENOENT (No such file or directory)
> open("/dev/rawctl", O_RDWR) = -1 ENOENT (No such file or directory)
>
> I have also removed the #ifdef OLD_RAW_DEVS (/dev/raw<N>) junk.
2008-12-26 03:41:36 +03:00
KERNEL=="rawctl", NAME="raw/rawctl", GROUP="disk"
2007-08-10 14:36:59 +04:00
SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
2009-01-05 14:34:55 +03:00
SUBSYSTEM=="bsg", NAME="bsg/%k"
SUBSYSTEM=="aoe", NAME="etherd/%k", GROUP="disk", MODE="0220"
2008-12-09 06:18:21 +03:00
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
2007-08-10 14:36:59 +04:00
# network
2008-12-22 18:15:37 +03:00
KERNEL=="tun", NAME="net/%k", MODE="0666"
2009-06-05 17:09:05 +04:00
KERNEL=="rfkill", MODE="0664"
2007-08-10 14:36:59 +04:00
# CPU
2009-04-24 02:29:53 +04:00
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid", MODE="0444"
2007-08-10 14:36:59 +04:00
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
# miscellaneous
KERNEL=="fuse", MODE="0666"
2008-12-21 15:48:55 +03:00
SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"
2007-10-14 16:48:14 +04:00
KERNEL=="auer[0-9]*", NAME="usb/%k"
2008-12-21 15:17:37 +03:00
KERNEL=="hw_random", NAME="hwrng"
2007-08-10 14:36:59 +04:00
KERNEL=="mmtimer", MODE="0644"
KERNEL=="rflash[0-9]*", MODE="0400"
KERNEL=="rrom[0-9]*", MODE="0400"
2009-03-18 04:32:12 +03:00
KERNEL=="sxctl", NAME="specialix_sxctl"
2008-12-21 15:01:40 +03:00
KERNEL=="rioctl", NAME="specialix_rioctl"
2007-08-16 14:47:37 +04:00
KERNEL=="iowarrior[0-9]*", NAME="usb/%k"
2008-11-28 04:01:51 +03:00
KERNEL=="hiddev[0-9]*", NAME="usb/%k"
KERNEL=="legousbtower[0-9]*", NAME="usb/%k"
KERNEL=="dabusb[0-9]*", NAME="usb/%k"
KERNEL=="usbdpfp[0-9]*", NAME="usb/%k"
KERNEL=="cpad[0-9]*", NAME="usb/%k"
2007-08-10 14:36:59 +04:00
2007-08-30 16:14:54 +04:00
# do not delete static device nodes
ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove"
2008-12-22 18:15:37 +03:00
ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove"