summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/libsystemd.sym
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-30 20:29:23 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-04-01 08:13:18 +0200
commitf9a726abefe1c25d952b36cd554e026e4c782967 (patch)
tree0af9baedf3a534d81c062a3aaa8a24cdcb7254c2 /src/libsystemd/libsystemd.sym
parentfd-util: rename loop_get_diskseq() -> fd_get_diskseq() (diff)
downloadsystemd-f9a726abefe1c25d952b36cd554e026e4c782967.tar.xz
systemd-f9a726abefe1c25d952b36cd554e026e4c782967.zip
sd-device: introduce sd_device_open()
We usually open() device node obtained by sd_device_get_devname(). However, the device node corresponds to the sd-device object may be already removed, and another device node with the same path may be created, hence an unexpected device may be opened. The sd_device_open() opens device node, and checks the devnum and diskseq of opened devnum, to avoid the above possibility. Prompted by https://github.com/systemd/systemd/issues/22906#issuecomment-1082736443.
Diffstat (limited to 'src/libsystemd/libsystemd.sym')
-rw-r--r--src/libsystemd/libsystemd.sym1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym
index 0066894d54..bdf76b467b 100644
--- a/src/libsystemd/libsystemd.sym
+++ b/src/libsystemd/libsystemd.sym
@@ -775,4 +775,5 @@ global:
sd_id128_to_uuid_string;
sd_device_new_from_devname;
sd_device_new_from_path;
+ sd_device_open;
} LIBSYSTEMD_250;