From d41120879358f783eb1a457f340c1a4b538a9410 Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Tue, 21 Oct 2003 22:08:03 -0700 Subject: [PATCH] rename namedev.permissions and namedev.config to udev.permissions and udev.config the namedev name didn't really make much sense anymore... --- Makefile | 8 ++++---- namedev.config | 26 -------------------------- namedev.permissions | 6 ------ udev.8 | 18 +++++++++--------- udev.c | 4 ++-- udev.config | 26 ++++++++++++++++++++++++++ udev.h | 6 +++--- udev.permissions | 6 ++++++ udev.spec | 4 ++-- 9 files changed, 52 insertions(+), 52 deletions(-) delete mode 100644 namedev.config delete mode 100644 namedev.permissions create mode 100644 udev.config create mode 100644 udev.permissions diff --git a/Makefile b/Makefile index 6710ede1b9..a5c00b7191 100644 --- a/Makefile +++ b/Makefile @@ -198,14 +198,14 @@ install: all $(INSTALL) -d $(hotplugdir) $(INSTALL_PROGRAM) -D $(ROOT) $(sbindir)/$(ROOT) $(INSTALL_DATA) -D udev.8 $(mandir)/man8/udev.8 - $(INSTALL_DATA) namedev.config $(configdir) - $(INSTALL_DATA) namedev.permissions $(configdir) + $(INSTALL_DATA) udev.config $(configdir) + $(INSTALL_DATA) udev.permissions $(configdir) - ln -s $(sbindir)/$(ROOT) $(hotplugdir)/udev.hotplug uninstall: - rm $(hotplugdir)/udev.hotplug - - rm $(configdir)/namedev.permissions - - rm $(configdir)/namedev.config + - rm $(configdir)/udev.permissions + - rm $(configdir)/udev.config - rm $(mandir)/man8/udev.8 - rm $(sbindir)/$(ROOT) - rmdir $(hotplugdir) diff --git a/namedev.config b/namedev.config deleted file mode 100644 index a0c6f9d1e8..0000000000 --- a/namedev.config +++ /dev/null @@ -1,26 +0,0 @@ -# My usb camera... -LABEL, BUS="usb", vendor="FUJIFILM", NAME="camera" - -# USB Epson printer to be called lp_epson -LABEL, BUS="usb", serial="HXOLL0012202323480", NAME="lp_epson" - -# USB HP printer to be called lp_hp -LABEL, BUS="usb", serial="W09090207101241330", NAME="lp_hp" - -# sound card with PCI bus id 00:0b.0 to be the first sound card -NUMBER, BUS="pci", id="00:0b.0", NAME="dsp" - -# sound card with PCI bus id 00:07.1 to be the second sound card -NUMBER, BUS="pci", id="00:07.1", NAME="dsp1" - -# USB mouse plugged into the third port of the first hub to be called mouse0 -TOPOLOGY, BUS="usb", place="1.3", NAME="mouse0" - -# USB tablet plugged into the third port of the second hub to be called mouse1 -TOPOLOGY, BUS="usb", place="2.3", NAME="mouse1" -TOPOLOGY, BUS="usb", place="2.4", NAME="mouse2" - -# ttyUSB1 should always be called visor -REPLACE, KERNEL="ttyUSB1", NAME="visor" -#REPLACE, KERNEL="ttyUSB0", NAME="pl2303" - diff --git a/namedev.permissions b/namedev.permissions deleted file mode 100644 index 66d8af1f7a..0000000000 --- a/namedev.permissions +++ /dev/null @@ -1,6 +0,0 @@ -#name:user:group:mode -ttyUSB0:root:uucp:0660 -ttyUSB1:root:uucp:0666 -visor:root:uucp:0666 -dsp1:::0666 - diff --git a/udev.8 b/udev.8 index 8865a7905a..42239c824d 100644 --- a/udev.8 +++ b/udev.8 @@ -18,16 +18,16 @@ On device creation, .B udev reads the sysfs directory of the given device to collect device attributes like label, serial number or bus device number. -These attributes are passed as a key to the namedev subsystem -to receive a unique name for device file creation. -namedev maintains a database for devices present on the system. +These attributes are treated as a key +to determine a unique name for device file creation. +udev maintains a database for devices present on the system. .br On device removal, .B udev -queries the namedev database for the name of the device file to be deleted. +queries the internal database for the name of the device file to be deleted. .SH "CONFIGURATION" -namedev expects its configuration at -.I /etc/udev/namedev.config. +udev expects its configuration at +.I /etc/udev/udev.config. The file consists of a set of lines. All empty lines and lines beginning with a '#' will be ignored. .br @@ -70,7 +70,7 @@ calling external program, that returns a string to match .br keys: \fBBUS\fP, \fBPROGRAM\fP, \fBID\fP .P -A sample \fInamedev.conf\fP might look like this: +A sample \fIudev.conf\fP might look like this: .sp .nf # USB printer to be called lp_color @@ -90,13 +90,13 @@ CALLOUT, PROGRAM="/sbin/dev_id", BUS="pci", ID="V0815", NAME="dev0815" .fi .P Permissions and ownership for the created device files may specified at -.I /etc/udev/namedev.permissions. +.I /etc/udev/udev.permissions. The file consists of a set of lines. All empty lines and lines beginning with a '#' will be ignored. .br Every line lists a device name followed by owner, group and permission mode. All values are separated by colons. .sp -A sample \fInamedev.permissions\fP might look like this: +A sample \fIudev.permissions\fP might look like this: .sp .nf #name:user:group:mode diff --git a/udev.c b/udev.c index ed42862c00..8746b9a810 100644 --- a/udev.c +++ b/udev.c @@ -74,8 +74,8 @@ static void get_dirs(void) { char *temp; char *udev_db = UDEV_DB; - char *udev_config = NAMEDEV_CONFIG_FILE; - char *udev_permission = NAMEDEV_CONFIG_PERMISSION_FILE; + char *udev_config = UDEV_CONFIG_FILE; + char *udev_permission = UDEV_CONFIG_PERMISSION_FILE; int retval; retval = sysfs_get_mnt_path(sysfs_path, SYSFS_PATH_MAX); diff --git a/udev.config b/udev.config new file mode 100644 index 0000000000..a0c6f9d1e8 --- /dev/null +++ b/udev.config @@ -0,0 +1,26 @@ +# My usb camera... +LABEL, BUS="usb", vendor="FUJIFILM", NAME="camera" + +# USB Epson printer to be called lp_epson +LABEL, BUS="usb", serial="HXOLL0012202323480", NAME="lp_epson" + +# USB HP printer to be called lp_hp +LABEL, BUS="usb", serial="W09090207101241330", NAME="lp_hp" + +# sound card with PCI bus id 00:0b.0 to be the first sound card +NUMBER, BUS="pci", id="00:0b.0", NAME="dsp" + +# sound card with PCI bus id 00:07.1 to be the second sound card +NUMBER, BUS="pci", id="00:07.1", NAME="dsp1" + +# USB mouse plugged into the third port of the first hub to be called mouse0 +TOPOLOGY, BUS="usb", place="1.3", NAME="mouse0" + +# USB tablet plugged into the third port of the second hub to be called mouse1 +TOPOLOGY, BUS="usb", place="2.3", NAME="mouse1" +TOPOLOGY, BUS="usb", place="2.4", NAME="mouse2" + +# ttyUSB1 should always be called visor +REPLACE, KERNEL="ttyUSB1", NAME="visor" +#REPLACE, KERNEL="ttyUSB0", NAME="pl2303" + diff --git a/udev.h b/udev.h index 4c8914f1e2..1f6e981cc2 100644 --- a/udev.h +++ b/udev.h @@ -52,9 +52,9 @@ extern int log_message (int level, const char *format, ...) /* filenames for the config and database files */ -#define UDEV_DB "udevdb.tdb" -#define NAMEDEV_CONFIG_PERMISSION_FILE "namedev.permissions" -#define NAMEDEV_CONFIG_FILE "namedev.config" +#define UDEV_DB "udev.tdb" +#define UDEV_CONFIG_PERMISSION_FILE "udev.permissions" +#define UDEV_CONFIG_FILE "udev.config" #define NAME_SIZE 100 #define OWNER_SIZE 30 diff --git a/udev.permissions b/udev.permissions new file mode 100644 index 0000000000..66d8af1f7a --- /dev/null +++ b/udev.permissions @@ -0,0 +1,6 @@ +#name:user:group:mode +ttyUSB0:root:uucp:0660 +ttyUSB1:root:uucp:0666 +visor:root:uucp:0666 +dsp1:::0666 + diff --git a/udev.spec b/udev.spec index fd6b488aeb..ffdfb2470d 100644 --- a/udev.spec +++ b/udev.spec @@ -34,8 +34,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/udev %attr(755,root,root) /udev/ %attr(755,root,root) /etc/udev/ -%attr(0644,root,root) /etc/udev/namedev.config -%attr(0644,root,root) /etc/udev/namedev.permissions +%attr(0644,root,root) /etc/udev/udev.config +%attr(0644,root,root) /etc/udev/udev.permissions %attr(-,root,root) /etc/hotplug.d/default/udev.hotplug %attr(0644,root,root) %{_mandir}/man8/udev.8* -- cgit v1.2.3-54-g00ecf