summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-07-17 23:45:32 +0200
committerGitHub <noreply@github.com>2024-07-17 23:45:32 +0200
commitbbddfe5249d1c858108b7828592dd899d11b3ae6 (patch)
tree9d4e8616457f26da2c959e9aca0c941f88b8da49 /src/shared
parentsd-device: remove debug log message when dirs are missing (diff)
parentsleep,home: always initialize UnitFreezer if used (diff)
downloadsystemd-bbddfe5249d1c858108b7828592dd899d11b3ae6.tar.xz
systemd-bbddfe5249d1c858108b7828592dd899d11b3ae6.zip
Merge pull request #33092 from YHNdnzj/freezer-cleanup
UnitFreezer: several cleanups
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-unit-util.c19
-rw-r--r--src/shared/bus-unit-util.h2
2 files changed, 0 insertions, 21 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index 751cb29c62..259fbeaf5c 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -3025,22 +3025,3 @@ int unit_freezer_freeze(UnitFreezer *f) {
int unit_freezer_thaw(UnitFreezer *f) {
return unit_freezer_action(f, false);
}
-
-int unit_freezer_new_freeze(const char *name, UnitFreezer **ret) {
- _cleanup_(unit_freezer_freep) UnitFreezer *f = NULL;
- int r;
-
- assert(name);
- assert(ret);
-
- r = unit_freezer_new(name, &f);
- if (r < 0)
- return r;
-
- r = unit_freezer_freeze(f);
- if (r < 0)
- return r;
-
- *ret = TAKE_PTR(f);
- return 0;
-}
diff --git a/src/shared/bus-unit-util.h b/src/shared/bus-unit-util.h
index ea4056c691..6f0d55971c 100644
--- a/src/shared/bus-unit-util.h
+++ b/src/shared/bus-unit-util.h
@@ -45,5 +45,3 @@ int unit_freezer_new(const char *name, UnitFreezer **ret);
int unit_freezer_freeze(UnitFreezer *f);
int unit_freezer_thaw(UnitFreezer *f);
-
-int unit_freezer_new_freeze(const char *name, UnitFreezer **ret);