We use the code from include/ and lib/ on many places, so use public
domain if possible or LGPL for code copied from libs.
Signed-off-by: Karel Zak <kzak@redhat.com>
- move struct chardata to include/ttyutils.h
- move console.{h,c} to login-utils/sulogin-* (it's sulogin specific)
- fix sulogin and agetty includes
Signed-off-by: Karel Zak <kzak@redhat.com>
This is very usefull if initrd can not loaded that is no /dev and no
/proc is found. Also if the /etc/shadow and /etc/passwd is copied into
the initrd the sulogin can be used in initrd even before /dev and/or /proc
are mounted.
Signed-off-by: Werner Fink <werner@suse.de>
with this the double linked list feature from util-linux is used
instead of the single linked list.
[kzak@redhat.com: use list_last_entry() and list INIT macros]
Signed-off-by: Werner Fink <werner@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Well, now all tty stuff are incline functions in include/ttyutils.h.
It's seems more elegant to create regular lib/ttyutils.c for libcommon
and write test program.
Signed-off-by: Karel Zak <kzak@redhat.com>
The current code goes immediately to the fallback section if any
detection method fails. It seems better to try another methods before
the fallback solution.
Signed-off-by: Karel Zak <kzak@redhat.com>
- add missing scandev() otherwise TIOCGDEV make no sense
- use this method independent on /proc/cmdline code
Signed-off-by: Karel Zak <kzak@redhat.com>
The current loopdev code prefers /sys to get information about
loop devices. The old methods like scan /dev are fallback solution
only. Unfortunately, the code does not check if /sys is mounted.
Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad
Signed-off-by: Karel Zak <kzak@redhat.com>
[kzak@redhat.com: - split from dmesg patch
- add more colors]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Partitions mapped by device-mapper are not like real partitions where
there's a /sys/block/<parent>/<name>/dev sysfs path. We need to look
at /sys/block/<name>/dev like we do for any other non-partition devices.
The mapped partition is not found otherwise.
For example, this bug shows up in lsblk while specifying a device
on command line while that device is a dm mapping over a partition:
$lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 128M 0 disk
`-test (dm-0) 253:0 0 128M 0 dm
`-test1 (dm-1) 253:1 0 127M 0 part
Before this patch:
$lsblk /dev/mapper/test1
lsblk: dm-1: unknown device name
With this patch:
$lsblk /dev/mapper/test1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
test1 (dm-1) 253:1 0 127M 0 part
kernel cryptoloop is deprecated since ages and support for cryptoloop
in util-linux is incomplete/broken.
- no password hashing
- last 8 bit of key are always set to zero
- no binary keys possible (stops reading key at \n and \0)
In the past some Distros added the above features with patches. So
remove cryptoloop support from util-linux completely to make sure
people won't try using it.
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>