summaryrefslogtreecommitdiff
path: root/udev.c
AgeCommit message (Collapse)Author
2005-04-26[PATCH] add udev logging to info logkay.sievers@vrfy.org
On Thu, Jan 15, 2004 at 05:14:16AM +0100, Kay Sievers wrote: > On Wed, Jan 14, 2004 at 01:10:43PM -0800, Greg KH wrote: > > On Wed, Jan 14, 2004 at 02:34:26PM -0600, Clay Haapala wrote: > > > On Wed, 14 Jan 2004, Chris Friesen spake thusly: > > > > > > > > Maybe for ones with a matching rule, you could print something like: > > > > > > > > > > > Is the act of printing/syslogging a rule in an of itself? > > > > No, as currently the only way stuff ends up in the syslog is if > > DEBUG=true is used on the build line. > > > > But it's sounding like we might want to change that... :) > > How about this in the syslog after connect/disconnect? > > Jan 15 05:07:45 pim udev[28007]: configured rule in '/etc/udev/udev.rules' at line 17 applied, 'video*' becomes 'video/webcam%n' > Jan 15 05:07:45 pim udev[28007]: creating device node '/udev/video/webcam0' > Jan 15 05:07:47 pim udev[28015]: removing device node '/udev/video/webcam0' Here is a slightly better version. I've created a logging.h file and moved the debug macros from udev.h in there. If you type: 'make' - you will get a binary that prints one or two lines to syslog if a device node is created or deleted 'make LOG=false' - you get a binary that prints asolutely nothing 'make DEBUG=true' - the same as today, it will print all debug lines
2005-04-26[PATCH] add usb_host and pci_bus to the class blacklist.greg@kroah.com
2005-04-26[PATCH] Cset exclude: greg@kroah.com|ChangeSet|20040113010256|48515greg@kroah.com
2005-04-26[PATCH] Fix stupid gcc "optimization" of 1 character printk() calls.... Ick...greg@kroah.com
2005-04-26[PATCH] more advanced user query optionskay.sievers@vrfy.org
Here is the '-h' and a '-d' to dump the whole database: kay@pim:~/src/udev.kay$ ./udev -d P: /block/hdb/hdb1 N: hdb1 S: O: G: P: /class/video4linux/video0 N: video/webcam0 S: camera0 kamera0 O: 500 G: 500 P: /block/hdc N: hdc S: O: G:
2005-04-26[PATCH] udev - advanced user query optionskay.sievers@vrfy.org
This patch improves the user options for udev. It is possible now to query for the name, the symlinks or owner/group. If asked for the name of the node we are able to prepend the udev_root with the -r option. SAMPLE: kay@pim:~/src/udev.test$ ./udev -V udev, version 012_bk kay@pim:~/src/udev.test$ ./udev -h Usage: [-qrVh] -q <name> query database for the specified value -p <path> device path used for query -r print udev root -V print udev version -h print this help text kay@pim:~/src/udev.test$ ./udev -r /udev/ kay@pim:~/src/udev.test$ ./udev -q name -p /class/video4linux/video0 video/webcam0 kay@pim:~/src/udev.test$ ./udev -q symlink -p /class/video4linux/video0 camera0 kamera0 kay@pim:~/src/udev.test$ ./udev -q owner -p /class/video4linux/video0 501 kay@pim:~/src/udev.test$ ./udev -r -q name -p /class/video4linux/video0 /udev/video/webcam0
2005-04-26[PATCH] udev 012 old gcc fixuptiggi@infa.abo.fi
Hello, without this patch: wolf@duel:/tmp/ud/udev-012>gcc -v Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs gcc version 2.95.3 20010315 (release) cannot compile udev.
2005-04-26[PATCH] add IGNORE rule typechristophe@saout.de
On Wed, Dec 31, 2003 at 11:24:53AM -0800, Greg KH wrote: > > There should be a possibility to tell udev not to create a device node. > > > > device-mapper: Usually set up by libdevmapper (or EVMS tools) which > > creates the device node on its own under /dev/mapper/<name>. > > > > With udev a second device is created named /dev/dm-<minor> which is not > > really needed. > > Good point. Ok, I'll agree with you. Care to make up a patch for this > kind of feature? Yes, I can try. There was no way to tell not to do anything so I created one. Errors are signalled via negative return values, so I thought that a positive, non-zero one could mean to ignore the device. I don't like it but perhaps you have a better solution.
2005-04-26[PATCH] small cleanupchristophe@saout.de
This one is nothing important, just add some quotes to be more consistent with the rest and make sure that the return value is positive (since the error return values are negative). Hmm?
2005-04-26[PATCH] add a blacklist of class devices we do not want to look at.greg@kroah.com
Thanks to Kay for the original patch, and the idea.
2005-04-26[PATCH] mention user callable udev + options in man pagekay.sievers@vrfy.org
As usual, here is the corresponding man page update and a small text correction.
2005-04-26[PATCH] make udev user callable to query the databasekay.sievers@vrfy.org
Here is a slightly better version that prints the usage if a unknown option is given: kay@pim:~/src/udev.kay$ ./udev -x ./udev: invalid option -- x Usage: [-qrVh] -q arg query database -r print udev root -V print udev version -h print this help text > Here is a patch that makes it possible to call udev with options on the command line. > Valid options are for now: > > -V for the udev version: > kay@pim:~/src/udev.kay$ ./udev -V > udev, version 011_bk > > -r for the udev root: > kay@pim:~/src/udev.kay$ ./udev -r > /udev/ > > -q to query the database with the sysfs path for the name of the node: > kay@pim:~/src/udev.kay$ ./udev -q /class/video4linux/video0 > test/video/webcam0
2005-04-26[PATCH] move the signal handling registration to after we have initialized ↵greg@kroah.com
enough stuff.
2005-04-26[PATCH] introduce signal handlermbuesch@freenet.de
Here's a patch that adds a signal handler to udev to clean up the environment (close the sysbus and close the database) on kill-signals.
2005-04-26[PATCH] proper cleanup on udevdb_init() failurembuesch@freenet.de
Seems like we need the following patch to do proper sysbus cleanup, if udevdb_init() fails.
2005-04-26[PATCH] move all of the DBUS logic into one file and remove all of the ↵greg@kroah.com
#ifdef crud from the main code.
2005-04-26[PATCH] D-BUS patch for udev-008david@fubar.dk
Attached is a patch against udev-008 to send out a D-BUS message when a device node is added or removed. Using D-BUS lingo, udev acquires the org.kernel.udev service and sends out a NodeCreated or NodeDeleted signal on the org.kernel.udev.NodeMonitor interface. Each signal carries two parameters: the node in question and the corresponding sysfs path. [Note: the D-BUS concepts of service, interface, object can be a bit confusing at first glance] An example program listening for these messages looks like this #!/usr/bin/python import dbus import gtk def udev_signal_received(dbus_iface, member, service, object_path, message): [filename, sysfs_path] = message.get_args_list() if member=='NodeCreated': print 'Node %s created for %s'%(filename, sysfs_path) elif member=='NodeDeleted': print 'Node %s deleted for %s'%(filename, sysfs_path) def main(): bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM) bus.add_signal_receiver(udev_signal_received, 'org.kernel.udev.NodeMonitor', # interface 'org.kernel.udev', # service '/org/kernel/udev/NodeMonitor') # object gtk.mainloop() if __name__ == '__main__': main() and this is the output when hot-plugging some usb-storage. [david@laptop udev-008]$ ~/node_monitor.py Node /udev/sda created for /block/sda Node /udev/sda1 created for /block/sda/sda1 Node /udev/sda1 deleted for /block/sda/sda1 Node /udev/sda deleted for /block/sda The patch requires D-BUS 0.20 or later while the python example program requires D-BUS from CVS as I only recently applied a patch against the python bindings.
2005-04-26[PATCH] get rid of the majority of the debug environment variables.greg@kroah.com
Now there are only 3 valid environment test variables. The rest can be specified with the config file.
2005-04-26[PATCH] add support for a main udev config file, udev.conf.greg@kroah.com
the older udev.config file is now called udev.rules. This allows us to better control configuration values, and move away from the environment variables.
2005-04-26[PATCH] changed the default location of the database to /udev/.udev.tdb to ↵greg@kroah.com
be LSB compliant Finally the Debian people can get off my back...
2005-04-26[PATCH] overall whitespace + debug text conditioningkay.sievers@vrfy.org
01-overall-whitespace+debug-text-conditioning.diff o cleanup whitespace o clarify a few comments o enclose all printed debug string values in ''
2005-04-26[PATCH] change UDEV_SYSFS_PATH environment variable due to libsysfs change.greg@kroah.com
2005-04-26[PATCH] rename namedev.permissions and namedev.config to udev.permissions ↵greg@kroah.com
and udev.config the namedev name didn't really make much sense anymore...
2005-04-26[PATCH] more overrides of config info with env variables if in test mode.greg@kroah.com
2005-04-26[PATCH] make config files, sysfs root, and udev root configurable from ↵greg@kroah.com
config variables This will make running tests a lot simpler.
2005-04-26[PATCH] add version to debug log on startup.greg@kroah.com
2005-04-26[PATCH] add callout config type to udevpatmans@us.ibm.com
This patch adds a callout config type to udev, so external programs can be called to get serial numbers or id's that are not available as a sysfs attribute.
2005-04-26[PATCH] udevdb patchdsteklof@us.ibm.com
This patch: 1) removes the three database files for just one udevdb.tdb file. 2) adds udevdb_init() and udevdb_exit() functions 3) initializes database now in main() in udev.c. Please look it over.
2005-04-26[PATCH] split udev main logic into udev-add and udev-remove.greg@kroah.com
2005-04-26[PATCH] Clean up the namedev interface a bit, making the code smaller...greg@kroah.com
2005-04-26[PATCH] add initial libsysfs support...greg@kroah.com
needs lots more cleanup, but is much nicer than doing this by hand...
2005-04-26[PATCH] Initial namedev parsing of config filesgreg@kroah.com
.permission parsing works, .config needs more work.
2005-04-26[PATCH] sleep for 2 seconds to give the kernel a chance to actually create ↵greg@kroah.com
the files we need.
2005-04-26[PATCH] remove now works!greg@kroah.com
2005-04-26[PATCH] restructure code to be able to actually get remove_node() to work.greg@kroah.com
2005-04-26[PATCH] Creating nodes actually works.greg@kroah.com
2005-04-26added initial files.Greg KH