On Fri, Jan 22, 2010 at 21:33, <d_k@xxxxxxxxxxxxx> wrote: > The document “Writing udev rules” does not correspond to the actual software > implemented. Looking upstream (for me) from the openSUSE 11.2 > implementation of version 146, version 150 of udev addresses part of the > documentation issues. But there are still documentation issues in 150. Writing-udev-rules is outdated and unmaintained. In some areas it even suggests the wrong things, which we do not recommend to do, or which do not even work anymore. I guess, we should just remove it from the udev source tree, unless someone is going to fix it. > There is some confusion on the rules location. Rules appear to be in both > /lib and /etc directories. Some documents appear to indicate that the /lib > area will be for generic rules which should not be user modified, while the > /etc directory should be used for custom rules. This is different from > previous versions that I have seen where all rules are in the /etc > directory. If this is true, then the “Writing udev rules” document needs to > be updated to explain that situation. Use "man udev". /lib is for system-installed rules, not to be edited by users. They are not config files. Users can put and edit stuff in /etc, and they possibly overwrite files in /lib with the same name. > Another issue is raised in 150: the NAME function appears to be scheduled > for discontinuation. The rules have been cleansed of this option for the > most part. But the document has multiple examples of the NAME option. NAME is not to be used in any default rule that creates a device node. The kernel supplies the name of the device, and the few exceptions we used in the past are gone now. There are valid uses of NAME, like for network devices, or overwrites for old kernels, but standard rules must no longer use NAME. > The revision history of the document has not been updated, so trying to see > when corrections have been made is not readily apparent. I have looked at > the website that the document refers to as the location of the most recent > version, but that one is far out-of-date verses what is in the released > documentation. As said, this document is outdated and not maintained. > Finally, why no NAME??? Because nothing should change the default kernel name. Symlinks should always be used instead of renaming. > I wanted to use that to give unique names to the > hot plug devices and then try to get KDE/Gnome to use them as labels for > differing devices plugging into the same port. The attribute functions > should be able to pick out a unique key to the differing devices so such a > name could be attached. The web has multiple references to using the > attributes to uniquely identify your device (and frequently attach a NAME to > it). Is there a different way to attach a unique moniker to a device? The > attributes are frequently long and obscure so using them would not be > feasible. “Mom's camera” and “Dad's camera” is a more usable description > for devices plugged into the same port. Is it possible to make a new dummy > variable and store it in a data table so it can be accessed with the library > calls? Or is it better/feasible to pull vendor, description and attribute > information from the existing/new udev library calls and have KDE/Gnome use > their own internal table to link up names (Would keep people from the > complexity of writing rules). Just thinking.... Nobody should need to write udev rules. Udev rules are system-global config instructions and should not be mixed-up with user settings. All this belongs at a different level in the desktop interface and not in /dev symlinks. Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html