]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: pidref_is_set_or_automatic()
authorIvan Kruglov <mail@ikruglov.com>
Wed, 16 Jul 2025 12:57:56 +0000 (05:57 -0700)
committerIvan Kruglov <mail@ikruglov.com>
Mon, 20 Oct 2025 09:10:00 +0000 (02:10 -0700)
src/basic/pidref.h

index 1a7ff85935e1d54fb7dcee29cb62a592cf663018..8280910f5d945e4331fa5da5570d2d2a2e2d8c5f 100644 (file)
@@ -55,6 +55,10 @@ static inline bool pidref_is_set(const PidRef *pidref) {
 
 bool pidref_is_automatic(const PidRef *pidref);
 
+static inline bool pidref_is_set_or_automatic(const PidRef *pidref) {
+        return pidref_is_set(pidref) || pidref_is_automatic(pidref);
+}
+
 static inline bool pidref_is_remote(const PidRef *pidref) {
         /* If the fd is set to -EREMOTE we assume PidRef does not refer to a local PID, but on another
          * machine (and we just got the PidRef initialized due to deserialization of some RPC message) */