tests: ts_device_init remove useless error handling

Don't know why we should deinit the empty string.
This patch prepares further refactoring or error handling.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libfdisk: fix %ju -> %zu

Signed-off-by: Karel Zak <kzak@redhat.com>
Revert "blkid: remove unused variable"

This reverts commit 0fd4b8132587a264f1e0df46eec7c12bba68c752.
cfdisk: fix compiler warning [-Wsign-compare]

Signed-off-by: Karel Zak <kzak@redhat.com>
agetty: avoid that agetty nor sulogin are fooled by a running plymouth

The nowadays used plymouth locks the devices used for the system
console which causes that agetty as well as sulogin can not modify
the termios settings of e.g. the serial devices of the systenm console.

Signed-off-by: Werner Fink <werner@suse.de>
sulogin: find a suitable console device 

Enable sulogin to find a suitable console device even if the first line
in /proc/consoles does not have any major and minor number.

Signed-off-by: Werner Fink <werner@suse.de>
agetty: better support of the special system consoles on S390

That is that there are several consoles, the /dev/ttyS0 which
is type of ibm3215 and a dumb terminal, then there is the device
/dev/3270/tty1 which can handle ANSI color escape sequences and is
a ibm327x terminal, and the /dev/ttyS1 which is a vt220 terminal.

The macro is_speed() in agetty.c allows to distinguish between the
terminal line (/dev)3270/tty1 and the speed options on the command
line used in

/run/systemd/generator/getty.target.wants/serial-getty@3270-tty1.service

which is a symbolic link to /usr/lib/systemd/system/serial-getty@.service

Signed-off-by: Werner Fink <werner@suse.de>
agetty: beside virtual consoles support xvc and hvc device lines as well

For this approach do not use the ioctl TIOCMGET anymore as this
is for real serial lines only. But switch over to use the ioctl
KDGKBMODE as this is unique to the virtual console lines only.

Signed-off-by: Werner Fink <werner@suse.de>
losetup: return EXIT_FAILURE on unsuccessful -f

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/colors: add support for @term and /home/kzak

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/colors: allow to temporary disable colors

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/colors: support schemes customization

 * parse terminal-colors.d/*.scheme files, expected format is

    <name> <color-sequence>

 * supported color sequences:

     - color name (e.g. "red")
     - dir_colors compatible xx;yy (e.g. 01;31) where the sequence may
       contains control chars like \e \a  ..etc.

 * scheme is parsed on demand

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: use new colors API

Signed-off-by: Karel Zak <kzak@redhat.com>
hexdump: use new colors API

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/colors: update man page

Signed-off-by: Karel Zak <kzak@redhat.com>
dmesg: support colors customization

Signed-off-by: Karel Zak <kzak@redhat.com>
hexdump: add --color to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: support colors customization

Signed-off-by: Karel Zak <kzak@redhat.com>
cfdisk: update man page COLORS section

Signed-off-by: Karel Zak <kzak@redhat.com>
agetty: fix odd check for chardev/tty

References: https://bugzilla.redhat.com/show_bug.cgi?id=1069902
Signed-off-by: Karel Zak <kzak@redhat.com>