1
0
mirror of https://github.com/systemd/systemd synced 2025-09-29 08:44:45 +02:00

Compare commits

..

6 Commits

Author SHA1 Message Date
moson-mo
2a613b34cc hwdb: Add Logitech MX 518 Legendary mouse
Add Logitech MX 518 Legendary model to hwdb.
2021-01-18 16:49:30 +01:00
Zbigniew Jędrzejewski-Szmek
9dffdb4e3c
Merge pull request #18289 from yuwata/core-load-fragment-cleanups
pid1: several cleanups for conf parsers
2021-01-18 16:48:44 +01:00
Yu Watanabe
2400743e1f core: add logs when credential value is duplicated 2021-01-18 01:32:49 +09:00
Yu Watanabe
8c6493e59e core: make config_parse_documentation() explicitly return 0 on success 2021-01-18 01:27:14 +09:00
Yu Watanabe
16eb0c4ad0 core: add missing log_oom() 2021-01-18 01:25:05 +09:00
Yu Watanabe
ca9169f47f core: do not fail when an invalid cpu affinity is specified 2021-01-18 01:22:48 +09:00
2 changed files with 35 additions and 26 deletions

View File

@ -432,6 +432,10 @@ mouse:usb:v046dpc51a:name:Logitech USB Receiver:*
mouse:usb:v046dpc01e:name:Logitech USB-PS/2 Optical Mouse:*
MOUSE_DPI=400@125 *800@125 1600@125
# Logitech MX 518 Legendary (HERO sensor)
mouse:usb:v046dpc08e:name:Logitech MX518 Gaming Mouse:*
MOUSE_DPI=400@1000 *800@1000 1600@1000 3200@1000 6400@1000
# Logitech MX1000 Laser Cordless Mouse
mouse:bluetooth:v046dpb003:name:Logitech MX1000 mouse:*
MOUSE_DPI=800@80

View File

@ -1682,16 +1682,17 @@ int config_parse_exec_root_hash_sig(
return 0;
}
int config_parse_exec_cpu_affinity(const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
int config_parse_exec_cpu_affinity(
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
ExecContext *c = data;
int r;
@ -1712,7 +1713,7 @@ int config_parse_exec_cpu_affinity(const char *unit,
if (r >= 0)
c->cpu_affinity_from_numa = false;
return r;
return 0;
}
int config_parse_capability_set(
@ -2742,7 +2743,7 @@ int config_parse_pass_environ(
if (n) {
r = strv_extend_strv(passenv, n, true);
if (r < 0)
return r;
return log_oom();
}
return 0;
@ -2817,7 +2818,7 @@ int config_parse_unset_environ(
if (n) {
r = strv_extend_strv(unsetenv, n, true);
if (r < 0)
return r;
return log_oom();
}
return 0;
@ -3095,16 +3096,17 @@ int config_parse_unit_requires_mounts_for(
}
}
int config_parse_documentation(const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
int config_parse_documentation(
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
Unit *u = userdata;
int r;
@ -3138,7 +3140,7 @@ int config_parse_documentation(const char *unit,
if (b)
*b = NULL;
return r;
return 0;
}
#if HAVE_SECCOMP
@ -4539,8 +4541,11 @@ int config_parse_set_credential(
r = hashmap_ensure_put(&context->set_credentials, &exec_set_credential_hash_ops, sc->id, sc);
if (r == -ENOMEM)
return log_oom();
if (r < 0)
return r;
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, l,
"Duplicated credential value '%s', ignoring assignment: %s", sc->id, rvalue);
return 0;
}
TAKE_PTR(sc);
}