summaryrefslogtreecommitdiff
path: root/src/basic/os-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-08 16:15:03 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-11 05:20:15 +0900
commitd67071d2f6f09676d01becbde65a338b13f3a012 (patch)
treeee9e911c8cee7d820ebf2e78508e843ad7b8f163 /src/basic/os-util.h
parentc2cd950817b50121f1d06bc83d7f459a1c283a72 (diff)
downloadsystemd-d67071d2f6f09676d01becbde65a338b13f3a012.tar.gz
os-util: use _IMAGE_CLASS_INVALID
When extension is not specified, image class is not necessary to be specified. Let's use _IMAGE_CLASS_INVALID as an indicator that no extension is specified.
Diffstat (limited to 'src/basic/os-util.h')
-rw-r--r--src/basic/os-util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/os-util.h b/src/basic/os-util.h
index 6121674361..0cd55f87c6 100644
--- a/src/basic/os-util.h
+++ b/src/basic/os-util.h
@@ -25,17 +25,17 @@ bool image_name_is_valid(const char *s) _pure_;
int path_is_extension_tree(ImageClass image_class, const char *path, const char *extension, bool relax_extension_release_check);
static inline int path_is_os_tree(const char *path) {
- return path_is_extension_tree(IMAGE_SYSEXT, path, NULL, false);
+ return path_is_extension_tree(_IMAGE_CLASS_INVALID, path, NULL, false);
}
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_SYSEXT, NULL, false, ret_path, ret_fd);
+ return open_extension_release(root, _IMAGE_CLASS_INVALID, NULL, false, ret_path, ret_fd);
}
int fopen_extension_release(const char *root, ImageClass image_class, const char *extension, bool relax_extension_release_check, char **ret_path, FILE **ret_file);
static inline int fopen_os_release(const char *root, char **ret_path, FILE **ret_file) {
- return fopen_extension_release(root, IMAGE_SYSEXT, NULL, false, ret_path, ret_file);
+ return fopen_extension_release(root, _IMAGE_CLASS_INVALID, NULL, false, ret_path, ret_file);
}
int _parse_extension_release(const char *root, ImageClass image_class, bool relax_extension_release_check, const char *extension, ...) _sentinel_;