mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 03:25:31 +03:00
The systemd System and Service Manager
5d4754f195
I am sending you a pre-release patch. It's everything that's in our current CVS tree. It adds the functionality you've been looking for. Please play with this before checking it into your tree, I'd like to know if it's ok with you or if you find problems. I have tested this out with test.all and the perl regression test. Let me know what you think. Still need to do more testing for our work and add some more functions related to the changes. I've gone into namedev.c and udev-add.c to make the necessary changes in line with the library. I have not gone and edited any of the "extras". Changes: 1) Libsysfs object structures work more as handles now, their included directories or devices are labeled private. If you need attributes from a sysfs_class_device, call the available function and don't access the directory directly. Same holds true for a sysfs_class_device sysfs_device. Do not access the link directly but call the function sysfs_get_classdev_device() instead. We only populate entries upon request, makes things faster and uses less memory. 2) Added sysfs_get_classdev_parent() as requested. 3) Changed getpagesize to sysconf. 4) Added sysfs_refresh_attributes function for refreshing views of attribute lists. We still need to add refresh for links and subdirs. All udev needs to do is keep calling sysfs_get_classdev_attr() and that will internally call the refresh routine. |
||
---|---|---|
docs | ||
etc/init.d | ||
extras | ||
klibc | ||
libsysfs | ||
tdb | ||
test | ||
ChangeLog | ||
COPYING | ||
FAQ | ||
klibc_fixups.c | ||
klibc_fixups.h | ||
list.h | ||
logging.c | ||
Makefile | ||
namedev_parse.c | ||
namedev.c | ||
namedev.h | ||
README | ||
TODO | ||
udev_config.c | ||
udev_dbus.c | ||
udev_dbus.h | ||
udev_sysbus_policy.conf | ||
udev-add.c | ||
udev-remove.c | ||
udev.8 | ||
udev.c | ||
udev.conf.in | ||
udev.h | ||
udev.permissions | ||
udev.permissions.debian | ||
udev.rules | ||
udev.rules.demo | ||
udev.rules.devfs | ||
udev.spec | ||
udevdb.c | ||
udevdb.h |
udev - a userspace implementation of devfs For more information on the design, and structure of this project, see the files in the docs/ directory. To use: - You must be running a 2.6 version of the Linux kernel. - Make sure sysfs is mounted. udev will figure out where sysfs is mounted, but the traditional place for it is at /sys. You can mount it by hand by running: mount -t sysfs none /sys - Make sure you have the latest version of the linux-hotplug scripts. They are available at linux-hotplug.sf.net or from your local kernel.org mirror at: kernel.org/pub/linux/utils/kernel/hotplug/ They are required in order for udev to work properly. If for some reason you do not install the hotplug scripts, you must tell the kernel to point the hotplug binary at wherever you install udev at. This can be done by: echo "/sbin/udev" > /proc/sys/kernel/hotplug - Build the project: make Note: There are a number of different flags that you can use when building udev. They are as follows: prefix - set this to the default root that you want udev to be installed into. This works just like the 'configure --prefix' script does. Default value is ''. Only override this if you really know what you are doing. KLIBC - if set to 'true', udev is built and linked against the included version of klibc. Default value is 'false'. DEBUG - if set to 'true', debugging messages will be sent to the syslog as udev is run. Default value is 'false'. DBUS - if set to 'true', DBUS messages will be sent everytime udev creates or removes a device node. This requires that DBUS development headers and libraries be present on your system to build properly. Default value is 'false'. So, if you want to build udev using klibc with debugging messages, you would do: make KLIBC=true DEBUG=true - Install the project: make install This will put the udev binary in /sbin, create the /udev and /etc/udev directories, and place the udev configuration files in /etc/udev. You will probably want to edit the namedev.* files to create custom naming rules. More info on how the config files are set up are contained in comments in the files, and is located in the documentation. - Add and remove devices from the system and marvel as nodes are created and removed in /udev/ based on the device types. - If you later get sick of it, uninstall it: make uninstall Things are still quite rough, and it's a bit beyond proof of concept code. Help is very much appreciated, see the TODO file for a list of things left to be done. If you want to build using klibc, use the Makefile.klibc file: - read the klibc/klibc/README file for how to set up the linux symlink properly. - make clean - make -f Makefile.klibc and marvel at the tiny binary you just created :) Any comment/questions/concerns please let me know. greg k-h greg@kroah.com