summaryrefslogtreecommitdiffstats
path: root/src/basic/os-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-08 11:16:04 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-11 11:49:23 +0200
commitf4a1d32c82489d2b734a3c266aa47ba697100312 (patch)
treecf503aba8d92274fbf4e6911c40c4faeb3c69e93 /src/basic/os-util.h
parentos-util: invert order of arguments in extension release parser (diff)
downloadsystemd-f4a1d32c82489d2b734a3c266aa47ba697100312.tar.xz
systemd-f4a1d32c82489d2b734a3c266aa47ba697100312.zip
os-util: merge parse_{extension,os}_release()
Diffstat (limited to 'src/basic/os-util.h')
-rw-r--r--src/basic/os-util.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/os-util.h b/src/basic/os-util.h
index e6acf21195..243d3c58ea 100644
--- a/src/basic/os-util.h
+++ b/src/basic/os-util.h
@@ -31,10 +31,11 @@ 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);
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_;
-#define parse_extension_release(root, image_class, extension, relax_extension_release_check, ...) _parse_extension_release(root, image_class, relax_extension_release_check, extension, __VA_ARGS__, NULL)
-#define parse_os_release(root, ...) _parse_os_release(root, __VA_ARGS__, NULL)
+int parse_extension_release_sentinel(const char *root, ImageClass image_class, bool relax_extension_release_check, const char *extension, ...) _sentinel_;
+#define parse_extension_release(root, image_class, extension, relax_extension_release_check, ...) \
+ parse_extension_release_sentinel(root, image_class, relax_extension_release_check, extension, __VA_ARGS__, NULL)
+#define parse_os_release(root, ...) \
+ parse_extension_release_sentinel(root, _IMAGE_CLASS_INVALID, false, NULL, __VA_ARGS__, NULL)
int load_extension_release_pairs(const char *root, ImageClass image_class, const char *extension, bool relax_extension_release_check, char ***ret);
static inline int load_os_release_pairs(const char *root, char ***ret) {