1
0
mirror of https://github.com/systemd/systemd synced 2026-03-05 20:54:45 +01:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
68f18549c5
Merge pull request #18001 from systemd/wip/hadess/unsupported-dmi
meson: Disable dmi_memory_id on arches without DMI
2020-12-17 09:16:33 +01:00
Lennart Poettering
ddbf960574 terminal-util: use 256 color mode for PID 1 output, too
Follow-up for: #17702

Alsoe, see earlier review comment: https://github.com/systemd/systemd/pull/17702#pullrequestreview-552329600
2020-12-17 09:15:26 +01:00
Bastien Nocera
2bfb92a978 meson: Disable dmi_memory_id on arches without DMI 2020-12-16 19:21:19 +01:00
Bastien Nocera
2f1bcc4d4d meson: Split off udev helper programs array 2020-12-16 18:43:26 +01:00
4 changed files with 20 additions and 7 deletions

View File

@ -17,7 +17,6 @@ rules = files('''
60-serial.rules
70-joystick.rules
70-mouse.rules
70-memory.rules
70-touchpad.rules
75-net-description.rules
75-probe_mtd.rules
@ -29,6 +28,10 @@ if conf.get('HAVE_KMOD') == 1
rules += files('80-drivers.rules')
endif
if dmi_arches.contains(host_machine.cpu_family())
rules += files('70-memory.rules')
endif
install_data(rules,
install_dir : udevrulesdir)

View File

@ -1240,9 +1240,14 @@ ColorMode get_color_mode(void) {
else if (getpid_cached() == 1)
/* PID1 outputs to the console without holding it open all the time.
* Also note the Linux console can only handle 16 colors.
*/
cached_color_mode = getenv_terminal_is_dumb() ? COLOR_OFF : COLOR_16;
*
* Note that the Linux console can only display 16 colors. We still enable 256 color
* mode even for PID1 output though (which typically goes to the Linux console),
* since the Linux console is able to parse the 256 color sequences and automatically
* map them to the closest color in the 16 color palette (since kernel 3.16). Doing
* 256 colors is nice for people who invoke systemd in a container or via a serial
* link or such, and use a true 256 color terminal to do so. */
cached_color_mode = getenv_terminal_is_dumb() ? COLOR_OFF : COLOR_256;
else
cached_color_mode = terminal_is_dumb() ? COLOR_OFF : COLOR_256;
}

View File

@ -164,7 +164,7 @@ libudevd_core = static_library(
link_with : udev_link_with,
dependencies : [libblkid, libkmod])
foreach prog : [['ata_id/ata_id.c'],
udev_id_progs = [['ata_id/ata_id.c'],
['cdrom_id/cdrom_id.c'],
['fido_id/fido_id.c',
'fido_id/fido_id_desc.c',
@ -174,11 +174,16 @@ foreach prog : [['ata_id/ata_id.c'],
'scsi_id/scsi_serial.c',
'scsi_id/scsi.h'],
['v4l_id/v4l_id.c'],
['dmi_memory_id/dmi_memory_id.c'],
['mtd_probe/mtd_probe.c',
'mtd_probe/mtd_probe.h',
'mtd_probe/probe_smartmedia.c']]
dmi_arches = ['x86', 'x86_64', 'aarch64', 'arm', 'ia64', 'mips']
if dmi_arches.contains(host_machine.cpu_family())
udev_id_progs += [['dmi_memory_id/dmi_memory_id.c']]
endif
foreach prog : udev_id_progs
executable(prog[0].split('/')[0],
prog,
include_directories : includes,

View File

@ -133,7 +133,7 @@ if conf.get('ENABLE_HWDB') == 1
endif
endif
if want_tests != false
if want_tests != false and dmi_arches.contains(host_machine.cpu_family())
udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh')
test('udev-dmi-memory-id-test',
udev_dmi_memory_id_test,