summaryrefslogtreecommitdiffstats
path: root/src/basic/os-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-08 18:02:13 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-11 11:44:50 +0200
commita84677e0f43e142094ebb1a870cd840cb2cac158 (patch)
treead2a251a8eb31b184e2a0f82908279f846dc1449 /src/basic/os-util.h
parentos-util: fix fd leak on failure (diff)
downloadsystemd-a84677e0f43e142094ebb1a870cd840cb2cac158.tar.xz
systemd-a84677e0f43e142094ebb1a870cd840cb2cac158.zip
os-util: split-out open_os_release() from open_extension_release()
The logics of opening os-release and extension-release are completely different. No functional change, just refactoring.
Diffstat (limited to 'src/basic/os-util.h')
-rw-r--r--src/basic/os-util.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/basic/os-util.h b/src/basic/os-util.h
index 374b4ee584..bd9e8949e6 100644
--- a/src/basic/os-util.h
+++ b/src/basic/os-util.h
@@ -29,9 +29,7 @@ static inline int path_is_os_tree(const char *path) {
}
int open_extension_release(const char *root, ImageClass image_class, const char *extension, bool relax_extension_release_check, char **ret_path, int *ret_fd);
-static inline int open_os_release(const char *root, char **ret_path, int *ret_fd) {
- return open_extension_release(root, _IMAGE_CLASS_INVALID, NULL, false, ret_path, ret_fd);
-}
+int open_os_release(const char *root, char **ret_path, int *ret_fd);
int _parse_extension_release(const char *root, ImageClass image_class, bool relax_extension_release_check, const char *extension, ...) _sentinel_;
int _parse_os_release(const char *root, ...) _sentinel_;