Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v252 batch #333

Merged
merged 10 commits into from
Sep 28, 2023
4 changes: 4 additions & 0 deletions hwdb.d/60-input-id.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ id-input:modalias:input:b0003v046Dp4066e0111*
id-input:modalias:input:b0003v068Ep00F2e0100*
ID_INPUT_ACCELEROMETER=0
ID_INPUT_JOYSTICK=1

# TEX Shinobi Trackpoint
id-input:modalias:input:b0003v04D9p0407e0111-e0,1,2,4*
ID_INPUT_POINTINGSTICK=1
12 changes: 12 additions & 0 deletions hwdb.d/60-keyboard.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ evdev:atkbd:dmi:*:svnPackardBell:pndots:*:rvnPackardBell:rnSJE01_CT:*
KEYBOARD_KEY_ce=unknown # Brightness Up, also emitted by acpi-video, ignore
KEYBOARD_KEY_ef=unknown # Brightness Down, also emitted by acpi-video, ignore

# Predator PT314-52s
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredator*PT314-52s:pvr*
KEYBOARD_KEY_66=micmute # Microphone mute button

# Predator PH 315-52
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredator*PH*315-52:*
KEYBOARD_KEY_ef=kbdillumup # Fn+F10
Expand Down Expand Up @@ -605,6 +609,11 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[pP][aA][vV][iI][lL][iI][oO
KEYBOARD_KEY_d9=unknown
KEYBOARD_KEY_d2=sysrq # Fn+Print = SYSRQ

# Pavilion gaming 15-dk1* (lid keys)
evdev:atkbd:dmi:bvn*:bvr*:bd*:br*:efr*:svnHP:pnHPPavilionGamingLaptop15-dk1*:*
KEYBOARD_KEY_d7=unknown
KEYBOARD_KEY_d8=unknown

# Spectre x360 13 (Prevents random airplane mode activation)
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[sS][pP][eE][cC][tT][rR][eE]*x360*13*:*
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*[sS][pP][eE][cC][tT][rR][eE]*x360Convertible*:*
Expand Down Expand Up @@ -1050,6 +1059,9 @@ evdev:input:b0003v04B3p301B*
evdev:name:SIPODEV Lenovo HID Device:dmi:*:svnLENOVO:*:pvrLenovoideapadD330-10IGM:*
KEYBOARD_KEY_70073=f21 # Fn+Supr (Touchpad toggle)

evdev:name:SIPODEV Lenovo HID Device Consumer Control:dmi:*:svnLENOVO:*:pvrLenovoideapadD330-10IGM:*
KEYBOARD_KEY_c00ff=fn_esc # Fn+Tab (FnLk toggle)

###########################################################
# LG
###########################################################
Expand Down
19 changes: 19 additions & 0 deletions hwdb.d/60-sensor.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ sensor:modalias:acpi:KIOX010A:*:dmi:*:svnAMI:*:skuH2M6:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1
ACCEL_LOCATION=display

#########################################
# BUSH
#########################################

# Bush Windows tablet
sensor:modalias:acpi:KIOX000A*:dmi:*:svnBUSH*:pnBushWindowstablet:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 1, 0, 0

#########################################
# Chuwi
#########################################
Expand Down Expand Up @@ -395,6 +403,7 @@ sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInternational,LLC.:bvrJP

# T11 / Juno Tablet 2
sensor:modalias:acpi:NSA2513*:dmi:*:svnDigitek:*
sensor:modalias:acpi:NSA2513*:dmi:*:svnDefaultstring:*
ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, 1

#########################################
Expand Down Expand Up @@ -925,6 +934,12 @@ sensor:modalias:acpi:SMO8500*:dmi:*:svnProwise:pnPT301:*
sensor:modalias:acpi:SMO8500*:dmi:*:rvnReeder:rnA8iW-Rev.A:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1

#########################################
# RCA
#########################################
sensor:modalias:acpi:KIOX000A*:dmi:*:svnRCA:pnW101SA23T1:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1

#########################################
# Schneider
#########################################
Expand Down Expand Up @@ -953,6 +968,10 @@ sensor:modalias:acpi:KIOX020A*:dmi:*:svnTECLAST:pnF6Pro:*
sensor:modalias:acpi:KIOX000A*:dmi:*:svnTECLAST:pnTbooK11:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1

# Teclast X3 Plus (G4K3)
sensor:modalias:acpi:KIOX000A*:dmi:*svnTECLAST:pnX3Plus:*:skuG4K3_A1:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1

# Teclast X4 2-in-1 (G4M6)
sensor:modalias:acpi:KIOX000A*:dmi:*:svnTECLAST:pnX4:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
Expand Down
8 changes: 6 additions & 2 deletions hwdb.d/70-mouse.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,13 @@ mouse:usb:v046dpc08b:name:Logitech G502 HERO SE:*
mouse:usb:v046dpc08b:name:Logitech G502 HERO Gaming Mouse:*
MOUSE_DPI=1200@1000 *2400@1000 3200@1000 6400@1000

# Logitech G502 X (Wired)
# Logitech G502 X
mouse:usb:v046dpc099:name:Logitech G502 X:*
MOUSE_DPI=800@1000 1200@1000 *1600@1000 2400@1000 3200@1000

# Logitech G502 X LIGHTSPEED (Wired)
mouse:usb:v046dpc098:name:Logitech, Inc. G502 X LIGHTSPEED:*
# Logitech G502 X (Wireless)
# Logitech G502 X LIGHTSPEED (Wireless)
# The USB receiver is also used by other mice. See #27118.
# If you want to enable the entry, please copy below to your custom hwdb file.
#mouse:usb:v046dpc547:name:Logitech USB Receiver:*
Expand Down
54 changes: 46 additions & 8 deletions hwdb.d/80-ieee1394-unit-function.hwdb
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,16 @@ ieee1394:ven0000022Emo00800007sp0000A02Dver00010001
IEEE1394_UNIT_FUNCTION_AUDIO=1
IEEE1394_UNIT_FUNCTION_VIDEO=0

# Please take an extra care since the vendor ID (0x0030E0) is for Oxford Semiconductor Ltd. and the
# model ID (0x00f970) is commonly in the other OXFW970 models.
ieee1394:node:ven0x0030e0mo0x00f970units0x00a02d:0x010001
ieee1394:ven000030E0mo0000F970sp0000A02Dver00010001
ID_VENDOR_FROM_DATABASE=Miglia Technology
ID_MODEL_FROM_DATABASE=Harmony Audio
IEEE1394_UNIT_FUNCTION_MIDI=0
IEEE1394_UNIT_FUNCTION_AUDIO=1
IEEE1394_UNIT_FUNCTION_VIDEO=0

#
# TC Applied Technologies. Digital Interface Communication Engine (DICE).
#
Expand Down Expand Up @@ -903,7 +913,7 @@ ieee1394:ven00001C6Amo00000002sp00001C6Aver00000001
ieee1394:node:ven0x001c6amo0x000003units0x001c6a:0x000001
ieee1394:ven00001C6Amo00000003sp00001C6Aver00000001
ID_VENDOR_FROM_DATABASE=Weiss Engineering
ID_MODEL_FROM_DATABASE=Minerva
ID_MODEL_FROM_DATABASE=DAC2/Minerva
IEEE1394_UNIT_FUNCTION_AUDIO=1

ieee1394:node:ven0x001c6amo0x000004units0x001c6a:0x000001
Expand All @@ -912,16 +922,14 @@ ieee1394:ven00001C6Amo00000004sp00001C6Aver00000001
ID_MODEL_FROM_DATABASE=AFI1
IEEE1394_UNIT_FUNCTION_AUDIO=1

ieee1394:node:ven0x001c6amo0x000005units0x001c6a:0x000001
ieee1394:ven00001C6Amo00000005sp00001C6Aver00000001
ID_VENDOR_FROM_DATABASE=Weiss Engineering
ID_MODEL_FROM_DATABASE=DAC1
IEEE1394_UNIT_FUNCTION_AUDIO=1

# Starting from the middle of life time of INT203, the same firmware as
# INT202 is compatible. The firmware dynamically switches its functionality
# based on the state of internal jumper pins. Additionally, the design of
# FireWire option card for DAC1 is something like embedded-INT203.
ieee1394:node:ven0x001c6amo0x000006units0x001c6a:0x000001
ieee1394:ven00001C6Amo00000006sp00001C6Aver00000001
ID_VENDOR_FROM_DATABASE=Weiss Engineering
ID_MODEL_FROM_DATABASE=INT202
ID_MODEL_FROM_DATABASE=INT202/INT203/DAC1
IEEE1394_UNIT_FUNCTION_AUDIO=1

ieee1394:node:ven0x001c6amo0x000007units0x001c6a:0x000001
Expand All @@ -930,6 +938,20 @@ ieee1394:ven00001C6Amo00000007sp00001C6Aver00000001
ID_MODEL_FROM_DATABASE=DAC202
IEEE1394_UNIT_FUNCTION_AUDIO=1

ieee1394:node:ven0x001c6amo0x000008units0x001c6a:0x000001
ieee1394:ven00001C6Amo00000008sp00001C6Aver00000001
ID_VENDOR_FROM_DATABASE=Weiss Engineering
ID_MODEL_FROM_DATABASE=DAC202/Maya
IEEE1394_UNIT_FUNCTION_AUDIO=1

# The older version of firmware for INT203. Additionally, the design of
# FireWire option card for DAC1 is something like embedded-INT203.
ieee1394:node:ven0x001c6amo0x00000aunits0x001c6a:0x000001
ieee1394:ven00001C6Amo0000000Asp00001C6Aver00000001
ID_VENDOR_FROM_DATABASE=Weiss Engineering
ID_MODEL_FROM_DATABASE=INT203/DAC1
IEEE1394_UNIT_FUNCTION_AUDIO=1

#
# Digidesign Digi00x family.
#
Expand Down Expand Up @@ -1387,3 +1409,19 @@ ieee1394:ven000001F2mo*sp000001F2ver00000024
ID_VENDOR_FROM_DATABASE=MOTU
ID_MODEL_FROM_DATABASE=MOTU V4HD
IEEE1394_UNIT_FUNCTION_VIDEO=1

# Weiss Engineering MAN301 (DICE application): unit 0: AV/C devices 1.0.
ieee1394:node:ven0x001c6amo0x00000bunits*0x00a02d:0x010001*
ieee1394:ven00001C6Amo0000000Bsp0000A02Dver00010001
ID_VENDOR_FROM_DATABASE=Weiss Engineering Ltd.
ID_MODEL_FROM_DATABASE=MAN301
IEEE1394_UNIT_FUNCTION_AUDIO=1
IEEE1394_UNIT_FUNCTION_VIDEO=0

# Weiss Engineering MAN301 (DICE application): unit 1: TCAT general protocol.
ieee1394:node:ven0x001c6amo0x00000bunits*0x001c6a:0x000001*
ieee1394:ven00001C6Amo0000000Bsp00001C6Aver00000001
ID_VENDOR_FROM_DATABASE=Weiss Engineering Ltd.
ID_MODEL_FROM_DATABASE=MAN301
IEEE1394_UNIT_FUNCTION_AUDIO=1
IEEE1394_UNIT_FUNCTION_VIDEO=0
1 change: 0 additions & 1 deletion man/kernel-command-line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<term><varname>systemd.unit=</varname></term>
<term><varname>rd.systemd.unit=</varname></term>
<term><varname>systemd.dump_core</varname></term>
<term><varname>systemd.early_core_pattern=</varname></term>
<term><varname>systemd.crash_chvt</varname></term>
<term><varname>systemd.crash_shell</varname></term>
<term><varname>systemd.crash_reboot</varname></term>
Expand Down
11 changes: 3 additions & 8 deletions man/sd_bus_error_add_map.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,15 @@
} sd_bus_error_map;</funcsynopsisinfo>

</funcsynopsis>
<funcsynopsisinfo><constant>SD_BUS_ERROR_MAP(<replaceable>name</replaceable>, <replaceable>code</replaceable>)</constant></funcsynopsisinfo>

<para>
<constant>SD_BUS_ERROR_MAP(<replaceable>name</replaceable>, <replaceable>code</replaceable>)</constant>
</para>
<para>
<constant>SD_BUS_ERROR_MAP_END</constant>
</para>
<funcsynopsisinfo><constant>SD_BUS_ERROR_MAP_END</constant></funcsynopsisinfo>

<funcprototype>
<funcdef>int <function>sd_bus_error_add_map</function></funcdef>
<paramdef>const sd_bus_error_map *<parameter>map</parameter></paramdef>
</funcprototype>

</funcsynopsis>
</refsynopsisdiv>

<refsect1>
Expand Down
2 changes: 1 addition & 1 deletion src/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ static void log_execution_mode(bool *ret_first_boot) {
r = read_one_line_file("/etc/machine-id", &id_text);
if (r < 0 || streq(id_text, "uninitialized")) {
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Unexpected error while reading /etc/machine-id, ignoring: %m");
log_warning_errno(r, "Unexpected error while reading /etc/machine-id, assuming first boot: %m");

first_boot = true;
log_info("Detected first boot.");
Expand Down
22 changes: 10 additions & 12 deletions src/journal/journald-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,17 @@ static int system_journal_open(Server *s, bool flush_requested, bool relinquish_

fn = strjoina(s->runtime_storage.path, "/system.journal");

if (s->system_journal && !relinquish_requested) {
if (!s->system_journal || relinquish_requested) {
/* OK, we really need the runtime journal, so create it if necessary. */

(void) mkdir_parents(s->runtime_storage.path, 0755);
(void) mkdir(s->runtime_storage.path, 0750);

r = open_journal(s, true, fn, O_RDWR|O_CREAT, false, &s->runtime_storage.metrics, &s->runtime_journal);
if (r < 0)
return log_error_errno(r, "Failed to open runtime journal: %m");

} else if (!flushed_flag_is_set(s)) {
/* Try to open the runtime journal, but only
* if it already exists, so that we can flush
* it into the system journal */
Expand All @@ -385,17 +394,6 @@ static int system_journal_open(Server *s, bool flush_requested, bool relinquish_

r = 0;
}

} else {

/* OK, we really need the runtime journal, so create it if necessary. */

(void) mkdir_parents(s->runtime_storage.path, 0755);
(void) mkdir(s->runtime_storage.path, 0750);

r = open_journal(s, true, fn, O_RDWR|O_CREAT, false, &s->runtime_storage.metrics, &s->runtime_journal);
if (r < 0)
return log_error_errno(r, "Failed to open runtime journal: %m");
}

if (s->runtime_journal) {
Expand Down
6 changes: 6 additions & 0 deletions src/network/networkd-sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ static int link_set_sr_iov_phys_port(Link *link) {
if (!link->dev)
return -ENODEV;

/* This may return -EINVAL or -ENODEV, instead of -ENOENT, if the device has been removed or is being
* removed. Let's map -EINVAL to -ENODEV, as the caller will ignore -ENODEV. */
r = sd_device_get_sysattr_value(link->dev, "dev_port", &dev_port);
if (r == -EINVAL)
return -ENODEV;
if (r < 0)
return r;

Expand Down Expand Up @@ -242,6 +246,8 @@ static int link_set_sr_iov_virt_ports(Link *link) {
return -ENODEV;

r = sd_device_get_sysattr_value(link->dev, "dev_port", &dev_port);
if (r == -EINVAL)
return -ENODEV;
if (r < 0)
return r;

Expand Down
2 changes: 1 addition & 1 deletion src/shared/hwdb-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static int trie_insert(struct trie *trie, struct trie_node *node, const char *se

for (size_t i = 0;; i++) {
size_t p;
uint8_t c;
char c;
struct trie_node *child;

for (p = 0; (c = trie->strings->buf[node->prefix_off + p]); p++) {
Expand Down
4 changes: 4 additions & 0 deletions src/udev/udevd.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "pretty-print.h"
#include "proc-cmdline.h"
#include "process-util.h"
#include "rlimit-util.h"
#include "selinux-util.h"
#include "signal-util.h"
#include "socket-util.h"
Expand Down Expand Up @@ -2040,6 +2041,9 @@ int run_udevd(int argc, char *argv[]) {
if (r < 0)
return r;

/* Make sure we can have plenty fds (for example for pidfds) */
(void) rlimit_nofile_bump(-1);

r = RET_NERRNO(mkdir("/run/udev", 0755));
if (r < 0 && r != -EEXIST)
return log_error_errno(r, "Failed to create /run/udev: %m");
Expand Down
8 changes: 6 additions & 2 deletions test/test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,12 @@ qemu_setup_swtpm_socket() {
swtpm socket --tpm2 --tpmstate dir="$state_dir" --ctrl type=unixio,path="$state_dir/sock" &
pid=$!
if ! kill -0 "$pid"; then
echo >&2 "Failed to setup swtpm socket"
derror "Failed to start swtpm"
return 1
fi

if ! timeout 5 bash -c "until [[ -S $state_dir/sock ]]; do sleep .5; done"; then
derror "Failed to setup swtpm socket"
return 1
fi

Expand Down Expand Up @@ -532,7 +537,6 @@ run_qemu() {
kernel_params+=(
"oops=panic"
"panic=1"
"softlockup_panic=1"
"systemd.wants=end.service"
)
fi
Expand Down
Loading