mirror of
https://github.com/systemd/systemd
synced 2026-03-22 23:04:52 +01:00
Compare commits
4 Commits
b838bc1126
...
b34a4f0e67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b34a4f0e67 | ||
|
|
30c9faff0d | ||
|
|
4e2544c30b | ||
|
|
441e011564 |
@ -1303,7 +1303,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnU90/U100:*
|
||||
# Keymaps MSI Prestige And MSI Modern FnKeys and Special keys
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*Prestige*:*
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*Modern*:*
|
||||
KEYBOARD_KEY_56=backslash # Secondary backslash key
|
||||
KEYBOARD_KEY_f1=f20 # Fn+F5 Micmute
|
||||
KEYBOARD_KEY_76=f21 # Fn+F4 Toggle touchpad, sends meta+ctrl+toggle
|
||||
KEYBOARD_KEY_91=prog1 # Fn+F7 Creation Center, sometime F7
|
||||
|
||||
@ -378,12 +378,13 @@ int unit_name_unescape(const char *f, char **ret) {
|
||||
}
|
||||
|
||||
int unit_name_path_escape(const char *f, char **ret) {
|
||||
char *p, *s;
|
||||
_cleanup_free_ char *p = NULL;
|
||||
char *s;
|
||||
|
||||
assert(f);
|
||||
assert(ret);
|
||||
|
||||
p = strdupa(f);
|
||||
p = strdup(f);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -395,13 +396,9 @@ int unit_name_path_escape(const char *f, char **ret) {
|
||||
if (!path_is_normalized(p))
|
||||
return -EINVAL;
|
||||
|
||||
/* Truncate trailing slashes */
|
||||
/* Truncate trailing slashes and skip leading slashes */
|
||||
delete_trailing_chars(p, "/");
|
||||
|
||||
/* Truncate leading slashes */
|
||||
p = skip_leading_chars(p, "/");
|
||||
|
||||
s = unit_name_escape(p);
|
||||
s = unit_name_escape(skip_leading_chars(p, "/"));
|
||||
}
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
@ -531,7 +528,7 @@ int unit_name_from_path(const char *path, const char *suffix, char **ret) {
|
||||
if (strlen(s) >= UNIT_NAME_MAX) /* Return a slightly more descriptive error for this specific condition */
|
||||
return -ENAMETOOLONG;
|
||||
|
||||
/* Refuse this if this got too long or for some other reason didn't result in a valid name */
|
||||
/* Refuse if this for some other reason didn't result in a valid name */
|
||||
if (!unit_name_is_valid(s, UNIT_NAME_PLAIN))
|
||||
return -EINVAL;
|
||||
|
||||
@ -565,7 +562,7 @@ int unit_name_from_path_instance(const char *prefix, const char *path, const cha
|
||||
if (strlen(s) >= UNIT_NAME_MAX) /* Return a slightly more descriptive error for this specific condition */
|
||||
return -ENAMETOOLONG;
|
||||
|
||||
/* Refuse this if this got too long or for some other reason didn't result in a valid name */
|
||||
/* Refuse if this for some other reason didn't result in a valid name */
|
||||
if (!unit_name_is_valid(s, UNIT_NAME_INSTANCE))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user