Compare commits
7 Commits
e9b0b64f77
...
79ac19ae61
Author | SHA1 | Date |
---|---|---|
Rocka | 79ac19ae61 | |
Balint Reczey | 287f506c32 | |
Yu Watanabe | 81eb5bc5cc | |
Peter Hutterer | 3d7ac1c655 | |
Yu Watanabe | 15db1f3d2e | |
Yu Watanabe | 443876d8dc | |
Yu Watanabe | 0ffbe10b81 |
|
@ -209,6 +209,10 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnConnect:pnTablet9:*
|
||||||
sensor:modalias:acpi:KIOX000A*:dmi:*:svncube:pni1-TF:*
|
sensor:modalias:acpi:KIOX000A*:dmi:*:svncube:pni1-TF:*
|
||||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||||
|
|
||||||
|
# Cube i7
|
||||||
|
sensor:modalias:acpi:SMO8500*:dmi:*:svncube:pni7:*
|
||||||
|
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||||
|
|
||||||
# Cube i7 Stylus
|
# Cube i7 Stylus
|
||||||
sensor:modalias:acpi:KIOX000A*:dmi:*:svnCube:pni7Stylus:*
|
sensor:modalias:acpi:KIOX000A*:dmi:*:svnCube:pni7Stylus:*
|
||||||
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
||||||
|
|
|
@ -74,11 +74,11 @@ static int dhcp4_route_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *li
|
||||||
/* It seems kernel does not support that the prefix route cannot be configured with
|
/* It seems kernel does not support that the prefix route cannot be configured with
|
||||||
* route table. Let's once drop the config and reconfigure them later. */
|
* route table. Let's once drop the config and reconfigure them later. */
|
||||||
|
|
||||||
log_link_message_debug_errno(link, m, r, "Could not set DHCPv4 route, retrying later: %m");
|
log_link_message_debug_errno(link, m, r, "Could not set DHCPv4 route, retrying later");
|
||||||
link->dhcp4_route_failed = true;
|
link->dhcp4_route_failed = true;
|
||||||
link->manager->dhcp4_prefix_root_cannot_set_table = true;
|
link->manager->dhcp4_prefix_root_cannot_set_table = true;
|
||||||
} else if (r < 0 && r != -EEXIST) {
|
} else if (r < 0 && r != -EEXIST) {
|
||||||
log_link_message_warning_errno(link, m, r, "Could not set DHCPv4 route: %m");
|
log_link_message_warning_errno(link, m, r, "Could not set DHCPv4 route");
|
||||||
link_enter_failed(link);
|
link_enter_failed(link);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -699,11 +699,9 @@ int userdb_all(UserDBFlags flags, UserDBIterator **ret) {
|
||||||
|
|
||||||
setpwent();
|
setpwent();
|
||||||
iterator->nss_iterating = true;
|
iterator->nss_iterating = true;
|
||||||
goto finish;
|
|
||||||
} else if (r < 0)
|
} else if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
finish:
|
|
||||||
*ret = TAKE_PTR(iterator);
|
*ret = TAKE_PTR(iterator);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -905,15 +903,9 @@ int groupdb_all(UserDBFlags flags, UserDBIterator **ret) {
|
||||||
|
|
||||||
setgrent();
|
setgrent();
|
||||||
iterator->nss_iterating = true;
|
iterator->nss_iterating = true;
|
||||||
goto finish;
|
} if (r < 0)
|
||||||
}
|
return r;
|
||||||
|
|
||||||
if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE))
|
|
||||||
goto finish;
|
|
||||||
|
|
||||||
return r;
|
|
||||||
|
|
||||||
finish:
|
|
||||||
*ret = TAKE_PTR(iterator);
|
*ret = TAKE_PTR(iterator);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "device-util.h"
|
#include "device-util.h"
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "missing_input.h"
|
#include "missing_input.h"
|
||||||
|
#include "parse-util.h"
|
||||||
#include "stdio-util.h"
|
#include "stdio-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "udev-builtin.h"
|
#include "udev-builtin.h"
|
||||||
|
@ -123,8 +124,25 @@ static void get_cap_mask(sd_device *pdev, const char* attr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct input_id get_input_id(sd_device *dev) {
|
||||||
|
const char *v;
|
||||||
|
struct input_id id = {};
|
||||||
|
|
||||||
|
if (sd_device_get_sysattr_value(dev, "id/bustype", &v) >= 0)
|
||||||
|
(void) safe_atoux16(v, &id.bustype);
|
||||||
|
if (sd_device_get_sysattr_value(dev, "id/vendor", &v) >= 0)
|
||||||
|
(void) safe_atoux16(v, &id.vendor);
|
||||||
|
if (sd_device_get_sysattr_value(dev, "id/product", &v) >= 0)
|
||||||
|
(void) safe_atoux16(v, &id.product);
|
||||||
|
if (sd_device_get_sysattr_value(dev, "id/version", &v) >= 0)
|
||||||
|
(void) safe_atoux16(v, &id.version);
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
/* pointer devices */
|
/* pointer devices */
|
||||||
static bool test_pointers(sd_device *dev,
|
static bool test_pointers(sd_device *dev,
|
||||||
|
const struct input_id *id,
|
||||||
const unsigned long* bitmask_ev,
|
const unsigned long* bitmask_ev,
|
||||||
const unsigned long* bitmask_abs,
|
const unsigned long* bitmask_abs,
|
||||||
const unsigned long* bitmask_key,
|
const unsigned long* bitmask_key,
|
||||||
|
@ -149,7 +167,7 @@ static bool test_pointers(sd_device *dev,
|
||||||
bool is_tablet = false;
|
bool is_tablet = false;
|
||||||
bool is_joystick = false;
|
bool is_joystick = false;
|
||||||
bool is_accelerometer = false;
|
bool is_accelerometer = false;
|
||||||
bool is_pointing_stick= false;
|
bool is_pointing_stick = false;
|
||||||
|
|
||||||
has_keys = test_bit(EV_KEY, bitmask_ev);
|
has_keys = test_bit(EV_KEY, bitmask_ev);
|
||||||
has_abs_coordinates = test_bit(ABS_X, bitmask_abs) && test_bit(ABS_Y, bitmask_abs);
|
has_abs_coordinates = test_bit(ABS_X, bitmask_abs) && test_bit(ABS_Y, bitmask_abs);
|
||||||
|
@ -229,6 +247,10 @@ static bool test_pointers(sd_device *dev,
|
||||||
!has_abs_coordinates)) /* mouse buttons and no axis */
|
!has_abs_coordinates)) /* mouse buttons and no axis */
|
||||||
is_mouse = true;
|
is_mouse = true;
|
||||||
|
|
||||||
|
/* There is no such thing as an i2c mouse */
|
||||||
|
if (is_mouse && id->bustype == BUS_I2C)
|
||||||
|
is_pointing_stick = true;
|
||||||
|
|
||||||
if (is_pointing_stick)
|
if (is_pointing_stick)
|
||||||
udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1");
|
udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1");
|
||||||
if (is_mouse)
|
if (is_mouse)
|
||||||
|
@ -326,6 +348,8 @@ static int builtin_input_id(sd_device *dev, int argc, char *argv[], bool test) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdev) {
|
if (pdev) {
|
||||||
|
struct input_id id = get_input_id(pdev);
|
||||||
|
|
||||||
/* Use this as a flag that input devices were detected, so that this
|
/* Use this as a flag that input devices were detected, so that this
|
||||||
* program doesn't need to be called more than once per device */
|
* program doesn't need to be called more than once per device */
|
||||||
udev_builtin_add_property(dev, test, "ID_INPUT", "1");
|
udev_builtin_add_property(dev, test, "ID_INPUT", "1");
|
||||||
|
@ -334,7 +358,7 @@ static int builtin_input_id(sd_device *dev, int argc, char *argv[], bool test) {
|
||||||
get_cap_mask(pdev, "capabilities/rel", bitmask_rel, sizeof(bitmask_rel), test);
|
get_cap_mask(pdev, "capabilities/rel", bitmask_rel, sizeof(bitmask_rel), test);
|
||||||
get_cap_mask(pdev, "capabilities/key", bitmask_key, sizeof(bitmask_key), test);
|
get_cap_mask(pdev, "capabilities/key", bitmask_key, sizeof(bitmask_key), test);
|
||||||
get_cap_mask(pdev, "properties", bitmask_props, sizeof(bitmask_props), test);
|
get_cap_mask(pdev, "properties", bitmask_props, sizeof(bitmask_props), test);
|
||||||
is_pointer = test_pointers(dev, bitmask_ev, bitmask_abs,
|
is_pointer = test_pointers(dev, &id, bitmask_ev, bitmask_abs,
|
||||||
bitmask_key, bitmask_rel,
|
bitmask_key, bitmask_rel,
|
||||||
bitmask_props, test);
|
bitmask_props, test);
|
||||||
is_key = test_key(dev, bitmask_ev, bitmask_key, test);
|
is_key = test_key(dev, bitmask_ev, bitmask_key, test);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
Description=Platform Persistent Storage Archival
|
Description=Platform Persistent Storage Archival
|
||||||
Documentation=man:systemd-pstore(8)
|
Documentation=man:systemd-pstore(8)
|
||||||
ConditionDirectoryNotEmpty=/sys/fs/pstore
|
ConditionDirectoryNotEmpty=/sys/fs/pstore
|
||||||
|
ConditionVirtualization=!container
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Wants=systemd-remount-fs.service
|
Wants=systemd-remount-fs.service
|
||||||
After=systemd-remount-fs.service
|
After=systemd-remount-fs.service
|
||||||
|
|
Loading…
Reference in New Issue