tree-wide: use -EINVAL for enum invalid values

As suggested in https://github.com/systemd/systemd/pull/11484#issuecomment-775288617.

This does not touch anything exposed in src/systemd. Changing the defines there
would be a compatibility break.

Note that tests are broken after this commit. They will be fixed in the next one.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-02-10 14:46:59 +01:00
parent 71c163c9fa
commit 2d93c20e5f
139 changed files with 255 additions and 245 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ enum {
VIRTUALIZATION_CONTAINER_LAST = VIRTUALIZATION_CONTAINER_OTHER,
_VIRTUALIZATION_MAX,
_VIRTUALIZATION_INVALID = -1
_VIRTUALIZATION_INVALID = -EINVAL,
};
static inline bool VIRTUALIZATION_IS_VM(int x) {