Current libudev-zero source code doesn't have license information in source files.
This patch add license information to source files based on SPDX standard.
Currently, "-soname" set at "libudev.so.1", but building library file name was "libudev.so".
Typical shared library structure as a follow;
libudev.so -> libudev.so.1
libudev.so.1
Current installation is reversed.
This patch fix this.
Ubuntu/Debian style file placement are ;
No.1 libudev.so and libudev.so.1 in /lib or /lib/arch/
No.2 libudev.h in /usr/include
No.3 libudev.pc in /usr/lib/pkgconfig or /usr/lib/arch/pkgconfig
Current Makefile can install No.1 and No.2 pattern by
"make PREFIX=/usr LIBDIR=/lib INCLUDEDIR=/usr/include install",
but it can't install No.3 pattern.
This patch added PKGCONFIGDIR environment variable to achieve all install pattern by
"make PREFIX=/usr LIBDIR=/lib INCLUDEDIR=/usr/include PKGCONFIGDIR=/usr/lib install"
We can fix THREAD_MAX at one since we don't gain much by having multiple
threads. All the threads did were translate inotify events. We also
no longer need pfd and the barrier fields of udev_monitor since we don't
need to signal the single thread or guard against any races.
Changed arbitrary size of sysattr to PAGESIZE[0]. Not sure about binary
sysattrs because they may be > PAGESIZE. Either way, we need dynamic
allocation to handle them.
Trim only trailing newlines, not the first one. Now content of the
sysattr not getting truncated. By the way, do we need to trim carrige
return '\r' too?
[0] https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt
> The buffer will always be PAGE_SIZE bytes in length. On i386, this
is 4096.
Fixes#25
Some keyboards have an absolute axis and would erroneously not be treated
as a keyboard. Now any device with keys would have the ID_INPUT_KEY
property set.