kernel code test: sysfs_create_link
userspace code test: libudev exapmles

Two examples from http://www.signal11.us/oss/udev/.

Very useful, thanks.