From 9fb1acb3a6729a685071cde8b1d37cf57dcd61ff Mon Sep 17 00:00:00 2001 From: xuxinyu Date: Thu, 5 Jan 2023 17:32:51 +0800 Subject: [PATCH] Don't try to clear storage on devices without internal storage This change prevents warnings like 'Failed to clear storage before first enrollment: Device has no storage.'. Signed-off-by: xuxinyu --- ...ar-storage-on-devices-without-intern.patch | 28 +++++++++++++++++++ fprintd.spec | 8 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch diff --git a/0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch b/0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch new file mode 100644 index 0000000..1a434e0 --- /dev/null +++ b/0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch @@ -0,0 +1,28 @@ +From 3633dbaa630d4734f3c63721eecbf935315cb80d Mon Sep 17 00:00:00 2001 +From: Julian +Date: Sun, 1 May 2022 00:29:09 +0200 +Subject: [PATCH 01/14] Don't try to clear storage on devices without internal + storage This change prevents warnings like 'Failed to clear storage before + first enrollment: Device has no storage.'. + +--- + src/device.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/device.c b/src/device.c +index df1e782..b9de3ee 100644 +--- a/src/device.c ++++ b/src/device.c +@@ -2209,7 +2209,8 @@ fprint_device_enroll_start (FprintDBusDevice *dbus_dev, + priv->enroll_data = finger; + priv->current_action = ACTION_ENROLL; + +- if (!fp_device_has_feature (priv->dev, FP_DEVICE_FEATURE_STORAGE_LIST) && ++ if (fp_device_has_feature (priv->dev, FP_DEVICE_FEATURE_STORAGE) && ++ !fp_device_has_feature (priv->dev, FP_DEVICE_FEATURE_STORAGE_LIST) && + is_first_enrollment (rdev)) + { + g_autoptr(GError) clear_err = NULL; +-- +2.37.1.windows.1 + diff --git a/fprintd.spec b/fprintd.spec index 86052b7..30eb00b 100644 --- a/fprintd.spec +++ b/fprintd.spec @@ -1,12 +1,13 @@ Name: fprintd Version: 1.94.2 -Release: 1 +Release: 2 Summary: D-Bus service for Fingerprint reader access License: GPLv2+ Source0: https://gitlab.freedesktop.org/libfprint/fprintd/-/archive/v%{version}/fprintd-v%{version}.tar.gz Url: http://www.freedesktop.org/wiki/Software/fprint/fprintd ExcludeArch: s390 s390x +Patch0001: 0001-Don-t-try-to-clear-storage-on-devices-without-intern.patch BuildRequires: meson BuildRequires: gcc @@ -93,6 +94,11 @@ fi %{_mandir}/man8/pam_fprintd.8.gz %changelog +* Thu Jan 05 2023 xuxinyu - 1.94.2-2 +- Don't try to clear storage on devices without internal +- storage This change prevents warnings like 'Failed to clear +- storage before first enrollment: Device has no storage.'. + * Mon May 30 2022 chenchen - 1.94.2-1 - Update to 1.94.2