summaryrefslogtreecommitdiff
path: root/src/grp-udev/libudev-core
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-udev/libudev-core')
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-blkid.c10
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-input_id.c10
-rw-r--r--src/grp-udev/libudev-core/udev-event.c2
3 files changed, 14 insertions, 8 deletions
diff --git a/src/grp-udev/libudev-core/udev-builtin-blkid.c b/src/grp-udev/libudev-core/udev-builtin-blkid.c
index 89fa75fa73..a2784aa03e 100644
--- a/src/grp-udev/libudev-core/udev-builtin-blkid.c
+++ b/src/grp-udev/libudev-core/udev-builtin-blkid.c
@@ -147,11 +147,6 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
if (sd_id128_equal(type, GPT_ESP)) {
sd_id128_t id, esp;
- unsigned long long flags;
-
- flags = blkid_partition_get_flags(pp);
- if (flags & GPT_FLAG_NO_AUTO)
- continue;
/* We found an ESP, let's see if it matches
* the ESP we booted from. */
@@ -167,6 +162,11 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
found_esp = true;
} else if (sd_id128_equal(type, GPT_ROOT_NATIVE)) {
+ unsigned long long flags;
+
+ flags = blkid_partition_get_flags(pp);
+ if (flags & GPT_FLAG_NO_AUTO)
+ continue;
/* We found a suitable root partition, let's
* remember the first one. */
diff --git a/src/grp-udev/libudev-core/udev-builtin-input_id.c b/src/grp-udev/libudev-core/udev-builtin-input_id.c
index 386ef5b5dc..711ec0b665 100644
--- a/src/grp-udev/libudev-core/udev-builtin-input_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c
@@ -211,8 +211,14 @@ static bool test_pointers(struct udev_device *dev,
else if (has_joystick_axes_or_buttons)
is_joystick = true;
}
- if (has_mt_coordinates && (is_direct || has_touch))
- is_touchscreen = true;
+ if (has_mt_coordinates) {
+ if (stylus_or_pen)
+ is_tablet = true;
+ else if (finger_but_no_pen && !is_direct)
+ is_touchpad = true;
+ else if (has_touch || is_direct)
+ is_touchscreen = true;
+ }
if (has_rel_coordinates && has_mouse_button)
is_mouse = true;
diff --git a/src/grp-udev/libudev-core/udev-event.c b/src/grp-udev/libudev-core/udev-event.c
index 59f4e1fb35..5bdf5aad02 100644
--- a/src/grp-udev/libudev-core/udev-event.c
+++ b/src/grp-udev/libudev-core/udev-event.c
@@ -249,7 +249,7 @@ subst:
if (event->program_result == NULL)
break;
- /* get part part of the result string */
+ /* get part of the result string */
i = 0;
if (attr != NULL)
i = strtoul(attr, &rest, 10);