lib: Update error messages according to new state change handling

This patch updates the error messages for the reworked state change handling
from Andri Yngvason you find in mainline Linux 3.19+

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
slcand: improve usage examples

The examples in the usage of slcand use a 'ttyslcan0' device which
is an uncommon name.  Use a more common ttyUSB0 name which is seen
with CANUSB devices.  Also, add an example showing that /dev/ttyUSB0
can be use as well.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
slcand: remove #define EXIT_FAILURE, EXIT_SUCCESS

slcand has #defines for EXIT_FAILURE and EXIT_SUCCESS but this is
unnecessary since they are already provided by stdlib.h.  Remove them.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
slcand: consistent use of exit(EXIT_FAILURE)

Some places used exit(1) and others used exit(EXIT_FAILURE).
Be consistent and use exit(EXIT_FAILURE) for all of these instances.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
use line discipline number from linux/tty.h

The line discipline number is provided in include/linux/tty.h.
Use that instead of a #define in each program.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
slcand: add example scripts for udev/systemd

The slcand daemon must be started after a serial CAN device is plugged
in to create the network interface (e.g. slcan0).  This can be done
manually but it is inconvenient.

Add example scripts for udev and systemd that can be used to start
slcand automatically when plugged in and to stop it when unplugged.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>