add license to each code/file, rework code from udev_example1.c