unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 505a5e7074875ea2608f776ea43f9c7b56042263 1481 bytes (raw)
name: gnu/packages/patches/eudev-pr-255.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
From b9cc389aabf14379685e4582c3275c23f5a9d0bc Mon Sep 17 00:00:00 2001
Message-ID: <b9cc389aabf14379685e4582c3275c23f5a9d0bc.1696071334.git.vivien@planete-kraus.eu>
From: NaofumiHonda <honda@math.sci.hokudai.ac.jp>
Date: Tue, 22 Aug 2023 00:17:45 +0900
Subject: [PATCH] Clear sysattr cache if a null pointer is passed (#255)

* Clear sysattr cache if a null pointer is passed

* remove tabs
---
 src/libudev/libudev-device.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index ac67ce846..d6bc4032a 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -1557,9 +1557,15 @@ _public_ int udev_device_set_sysattr_value(struct udev_device *udev_device, cons
         dev = udev_device;
         if (sysattr == NULL)
                 return -EINVAL;
-        if (value == NULL)
-                value_len = 0;
-        else
+        if (value == NULL) {
+                struct udev_list_entry *list_entry;
+
+                list_entry = udev_list_get_entry(&udev_device->sysattr_value_list);
+                list_entry = udev_list_entry_get_by_name(list_entry, sysattr);
+                if (list_entry != NULL)
+                        udev_list_entry_delete(list_entry);
+                goto out;
+        } else
                 value_len = strlen(value);
 
         strscpyl(path, sizeof(path), udev_device_get_syspath(dev), "/", sysattr, NULL);
-- 
2.41.0


debug log:

solving 505a5e7074 ...
found 505a5e7074 in https://yhetil.org/guix-patches/ab54b51365fb18c06f235fedf451e64bad0c88bb.1696083614.git.vivien@planete-kraus.eu/

applying [1/1] https://yhetil.org/guix-patches/ab54b51365fb18c06f235fedf451e64bad0c88bb.1696083614.git.vivien@planete-kraus.eu/
diff --git a/gnu/packages/patches/eudev-pr-255.patch b/gnu/packages/patches/eudev-pr-255.patch
new file mode 100644
index 0000000000..505a5e7074

1:41: trailing whitespace.
 
1:43: trailing whitespace.
-- 
Checking patch gnu/packages/patches/eudev-pr-255.patch...
1:45: new blank line at EOF.
+
Applied patch gnu/packages/patches/eudev-pr-255.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 505a5e7074875ea2608f776ea43f9c7b56042263	gnu/packages/patches/eudev-pr-255.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).