diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/bond-util.h | 16 | ||||
-rw-r--r-- | src/shared/bootspec.h | 2 | ||||
-rw-r--r-- | src/shared/bus-util.h | 2 | ||||
-rw-r--r-- | src/shared/bus-wait-for-units.h | 2 | ||||
-rw-r--r-- | src/shared/condition.c | 2 | ||||
-rw-r--r-- | src/shared/condition.h | 4 | ||||
-rw-r--r-- | src/shared/coredump-util.h | 2 | ||||
-rw-r--r-- | src/shared/discover-image.h | 4 | ||||
-rw-r--r-- | src/shared/dissect-image.h | 2 | ||||
-rw-r--r-- | src/shared/ethtool-util.h | 8 | ||||
-rw-r--r-- | src/shared/format-table.h | 2 | ||||
-rw-r--r-- | src/shared/geneve-util.h | 2 | ||||
-rw-r--r-- | src/shared/hostname-setup.h | 2 | ||||
-rw-r--r-- | src/shared/id128-print.h | 2 | ||||
-rw-r--r-- | src/shared/import-util.h | 2 | ||||
-rw-r--r-- | src/shared/install.h | 4 | ||||
-rw-r--r-- | src/shared/ipvlan-util.h | 4 | ||||
-rw-r--r-- | src/shared/json-internal.h | 2 | ||||
-rw-r--r-- | src/shared/json.h | 2 | ||||
-rw-r--r-- | src/shared/macvlan-util.h | 2 | ||||
-rw-r--r-- | src/shared/netif-naming-scheme.h | 2 | ||||
-rw-r--r-- | src/shared/output-mode.h | 2 | ||||
-rw-r--r-- | src/shared/resolve-util.h | 6 | ||||
-rw-r--r-- | src/shared/udev-util.h | 2 | ||||
-rw-r--r-- | src/shared/user-record.h | 4 | ||||
-rw-r--r-- | src/shared/varlink.c | 2 | ||||
-rw-r--r-- | src/shared/volatile-util.h | 2 |
27 files changed, 44 insertions, 44 deletions
diff --git a/src/shared/bond-util.h b/src/shared/bond-util.h index a8f9ecb454..9e693b16ad 100644 --- a/src/shared/bond-util.h +++ b/src/shared/bond-util.h @@ -21,7 +21,7 @@ typedef enum BondMode { NETDEV_BOND_MODE_BALANCE_TLB = BOND_MODE_TLB, NETDEV_BOND_MODE_BALANCE_ALB = BOND_MODE_ALB, _NETDEV_BOND_MODE_MAX, - _NETDEV_BOND_MODE_INVALID = -1 + _NETDEV_BOND_MODE_INVALID = -EINVAL, } BondMode; typedef enum BondXmitHashPolicy { @@ -31,14 +31,14 @@ typedef enum BondXmitHashPolicy { NETDEV_BOND_XMIT_HASH_POLICY_ENCAP23 = BOND_XMIT_POLICY_ENCAP23, NETDEV_BOND_XMIT_HASH_POLICY_ENCAP34 = BOND_XMIT_POLICY_ENCAP34, _NETDEV_BOND_XMIT_HASH_POLICY_MAX, - _NETDEV_BOND_XMIT_HASH_POLICY_INVALID = -1 + _NETDEV_BOND_XMIT_HASH_POLICY_INVALID = -EINVAL, } BondXmitHashPolicy; typedef enum BondLacpRate { NETDEV_BOND_LACP_RATE_SLOW, NETDEV_BOND_LACP_RATE_FAST, _NETDEV_BOND_LACP_RATE_MAX, - _NETDEV_BOND_LACP_RATE_INVALID = -1, + _NETDEV_BOND_LACP_RATE_INVALID = -EINVAL, } BondLacpRate; typedef enum BondAdSelect { @@ -46,7 +46,7 @@ typedef enum BondAdSelect { NETDEV_BOND_AD_SELECT_BANDWIDTH, NETDEV_BOND_AD_SELECT_COUNT, _NETDEV_BOND_AD_SELECT_MAX, - _NETDEV_BOND_AD_SELECT_INVALID = -1, + _NETDEV_BOND_AD_SELECT_INVALID = -EINVAL, } BondAdSelect; typedef enum BondFailOverMac { @@ -54,7 +54,7 @@ typedef enum BondFailOverMac { NETDEV_BOND_FAIL_OVER_MAC_ACTIVE, NETDEV_BOND_FAIL_OVER_MAC_FOLLOW, _NETDEV_BOND_FAIL_OVER_MAC_MAX, - _NETDEV_BOND_FAIL_OVER_MAC_INVALID = -1, + _NETDEV_BOND_FAIL_OVER_MAC_INVALID = -EINVAL, } BondFailOverMac; typedef enum BondArpValidate { @@ -63,14 +63,14 @@ typedef enum BondArpValidate { NETDEV_BOND_ARP_VALIDATE_BACKUP, NETDEV_BOND_ARP_VALIDATE_ALL, _NETDEV_BOND_ARP_VALIDATE_MAX, - _NETDEV_BOND_ARP_VALIDATE_INVALID = -1, + _NETDEV_BOND_ARP_VALIDATE_INVALID = -EINVAL, } BondArpValidate; typedef enum BondArpAllTargets { NETDEV_BOND_ARP_ALL_TARGETS_ANY, NETDEV_BOND_ARP_ALL_TARGETS_ALL, _NETDEV_BOND_ARP_ALL_TARGETS_MAX, - _NETDEV_BOND_ARP_ALL_TARGETS_INVALID = -1, + _NETDEV_BOND_ARP_ALL_TARGETS_INVALID = -EINVAL, } BondArpAllTargets; typedef enum BondPrimaryReselect { @@ -78,7 +78,7 @@ typedef enum BondPrimaryReselect { NETDEV_BOND_PRIMARY_RESELECT_BETTER, NETDEV_BOND_PRIMARY_RESELECT_FAILURE, _NETDEV_BOND_PRIMARY_RESELECT_MAX, - _NETDEV_BOND_PRIMARY_RESELECT_INVALID = -1, + _NETDEV_BOND_PRIMARY_RESELECT_INVALID = -EINVAL, } BondPrimaryReselect; const char *bond_mode_to_string(BondMode d) _const_; diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index 1557bd0680..c7b4a2ee02 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -15,7 +15,7 @@ typedef enum BootEntryType { BOOT_ENTRY_UNIFIED, /* Type #2 entries: *.efi files */ BOOT_ENTRY_LOADER, /* Additional entries augmented from LoaderEntries EFI var */ _BOOT_ENTRY_MAX, - _BOOT_ENTRY_INVALID = -1, + _BOOT_ENTRY_INVALID = -EINVAL, } BootEntryType; typedef struct BootEntry { diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h index 27dd6c19c0..e0d4d5d915 100644 --- a/src/shared/bus-util.h +++ b/src/shared/bus-util.h @@ -19,7 +19,7 @@ typedef enum BusTransport { BUS_TRANSPORT_REMOTE, BUS_TRANSPORT_MACHINE, _BUS_TRANSPORT_MAX, - _BUS_TRANSPORT_INVALID = -1 + _BUS_TRANSPORT_INVALID = -EINVAL, } BusTransport; int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *name); diff --git a/src/shared/bus-wait-for-units.h b/src/shared/bus-wait-for-units.h index f7ab666f15..2623e72ced 100644 --- a/src/shared/bus-wait-for-units.h +++ b/src/shared/bus-wait-for-units.h @@ -11,7 +11,7 @@ typedef enum BusWaitForUnitsState { BUS_WAIT_FAILURE, /* dito, but something failed */ BUS_WAIT_RUNNING, /* Still something to wait for */ _BUS_WAIT_FOR_UNITS_STATE_MAX, - _BUS_WAIT_FOR_UNITS_STATE_INVALID = -1, + _BUS_WAIT_FOR_UNITS_STATE_INVALID = -EINVAL, } BusWaitForUnitsState; typedef enum BusWaitForUnitsFlags { diff --git a/src/shared/condition.c b/src/shared/condition.c index 616e77994d..8b00697762 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -146,7 +146,7 @@ typedef enum { ORDER_EQUAL, ORDER_UNEQUAL, _ORDER_MAX, - _ORDER_INVALID = -1 + _ORDER_INVALID = -EINVAL, } OrderOperator; static OrderOperator parse_order(const char **s) { diff --git a/src/shared/condition.h b/src/shared/condition.h index 0d9754eb85..7853490290 100644 --- a/src/shared/condition.h +++ b/src/shared/condition.h @@ -40,7 +40,7 @@ typedef enum ConditionType { CONDITION_CONTROL_GROUP_CONTROLLER, _CONDITION_TYPE_MAX, - _CONDITION_TYPE_INVALID = -1 + _CONDITION_TYPE_INVALID = -EINVAL, } ConditionType; typedef enum ConditionResult { @@ -49,7 +49,7 @@ typedef enum ConditionResult { CONDITION_FAILED, CONDITION_ERROR, _CONDITION_RESULT_MAX, - _CONDITION_RESULT_INVALID = -1 + _CONDITION_RESULT_INVALID = -EINVAL, } ConditionResult; typedef struct Condition { diff --git a/src/shared/coredump-util.h b/src/shared/coredump-util.h index a7f3c0e86c..09e7ed443f 100644 --- a/src/shared/coredump-util.h +++ b/src/shared/coredump-util.h @@ -14,7 +14,7 @@ typedef enum CoredumpFilter { COREDUMP_FILTER_PRIVATE_DAX, COREDUMP_FILTER_SHARED_DAX, _COREDUMP_FILTER_MAX, - _COREDUMP_FILTER_INVALID = -1, + _COREDUMP_FILTER_INVALID = -EINVAL, } CoredumpFilter; #define COREDUMP_FILTER_MASK_DEFAULT (1u << COREDUMP_FILTER_PRIVATE_ANONYMOUS | \ diff --git a/src/shared/discover-image.h b/src/shared/discover-image.h index c568fff751..a266d4abdb 100644 --- a/src/shared/discover-image.h +++ b/src/shared/discover-image.h @@ -18,7 +18,7 @@ typedef enum ImageClass { IMAGE_PORTABLE, IMAGE_EXTENSION, _IMAGE_CLASS_MAX, - _IMAGE_CLASS_INVALID = -1 + _IMAGE_CLASS_INVALID = -EINVAL, } ImageClass; typedef enum ImageType { @@ -27,7 +27,7 @@ typedef enum ImageType { IMAGE_RAW, IMAGE_BLOCK, _IMAGE_TYPE_MAX, - _IMAGE_TYPE_INVALID = -1 + _IMAGE_TYPE_INVALID = -EINVAL, } ImageType; typedef struct Image { diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h index 5466de5042..70363ded48 100644 --- a/src/shared/dissect-image.h +++ b/src/shared/dissect-image.h @@ -45,7 +45,7 @@ typedef enum PartitionDesignator { PARTITION_TMP, PARTITION_VAR, _PARTITION_DESIGNATOR_MAX, - _PARTITION_DESIGNATOR_INVALID = -1 + _PARTITION_DESIGNATOR_INVALID = -EINVAL, } PartitionDesignator; static inline PartitionDesignator PARTITION_VERITY_OF(PartitionDesignator p) { diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h index f94b3e15bf..11e2906681 100644 --- a/src/shared/ethtool-util.h +++ b/src/shared/ethtool-util.h @@ -15,7 +15,7 @@ typedef enum Duplex { DUP_HALF = DUPLEX_HALF, DUP_FULL = DUPLEX_FULL, _DUP_MAX, - _DUP_INVALID = -1 + _DUP_INVALID = -EINVAL, } Duplex; typedef enum WakeOnLan { @@ -28,7 +28,7 @@ typedef enum WakeOnLan { WOL_MAGICSECURE, WOL_OFF, _WOL_MAX, - _WOL_INVALID = -1 + _WOL_INVALID = -EINVAL, } WakeOnLan; typedef enum NetDevFeature { @@ -40,7 +40,7 @@ typedef enum NetDevFeature { NET_DEV_FEAT_TSO, NET_DEV_FEAT_TSO6, _NET_DEV_FEAT_MAX, - _NET_DEV_FEAT_INVALID = -1 + _NET_DEV_FEAT_INVALID = -EINVAL, } NetDevFeature; typedef enum NetDevPort { @@ -53,7 +53,7 @@ typedef enum NetDevPort { NET_DEV_PORT_NONE = PORT_NONE, NET_DEV_PORT_OTHER = PORT_OTHER, _NET_DEV_PORT_MAX, - _NET_DEV_PORT_INVALID = -1 + _NET_DEV_PORT_INVALID = -EINVAL, } NetDevPort; #define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32 (SCHAR_MAX) diff --git a/src/shared/format-table.h b/src/shared/format-table.h index 6627a291f3..7adb245319 100644 --- a/src/shared/format-table.h +++ b/src/shared/format-table.h @@ -54,7 +54,7 @@ typedef enum TableDataType { TABLE_SET_URL, TABLE_SET_UPPERCASE, - _TABLE_DATA_TYPE_INVALID = -1, + _TABLE_DATA_TYPE_INVALID = -EINVAL, } TableDataType; /* PIDs are just 32bit signed integers on Linux */ diff --git a/src/shared/geneve-util.h b/src/shared/geneve-util.h index 3865f805a4..acd0e1a1a2 100644 --- a/src/shared/geneve-util.h +++ b/src/shared/geneve-util.h @@ -10,7 +10,7 @@ typedef enum GeneveDF { NETDEV_GENEVE_DF_SET = GENEVE_DF_SET, NETDEV_GENEVE_DF_INHERIT = GENEVE_DF_INHERIT, _NETDEV_GENEVE_DF_MAX, - _NETDEV_GENEVE_DF_INVALID = -1, + _NETDEV_GENEVE_DF_INVALID = -EINVAL, } GeneveDF; const char *geneve_df_to_string(GeneveDF d) _const_; diff --git a/src/shared/hostname-setup.h b/src/shared/hostname-setup.h index 1c9d08a5df..1fa0b6f333 100644 --- a/src/shared/hostname-setup.h +++ b/src/shared/hostname-setup.h @@ -8,7 +8,7 @@ typedef enum HostnameSource { HOSTNAME_STATIC, /* from /etc/hostname */ HOSTNAME_TRANSIENT, /* a transient hostname set through systemd, hostnamed, the container manager, or otherwise */ HOSTNAME_FALLBACK, /* the compiled-in fallback was used */ - _HOSTNAME_INVALID = -1, + _HOSTNAME_INVALID = -EINVAL, } HostnameSource; const char* hostname_source_to_string(HostnameSource source) _const_; diff --git a/src/shared/id128-print.h b/src/shared/id128-print.h index d69cb9b551..7b2e593f16 100644 --- a/src/shared/id128-print.h +++ b/src/shared/id128-print.h @@ -11,7 +11,7 @@ typedef enum Id128PrettyPrintMode { ID128_PRINT_UUID, ID128_PRINT_PRETTY, _ID128_PRETTY_PRINT_MODE_MAX, - _ID128_PRETTY_PRINT_MODE_INVALID = -1 + _ID128_PRETTY_PRINT_MODE_INVALID = -EINVAL, } Id128PrettyPrintMode; int id128_pretty_print_sample(const char *name, sd_id128_t id); diff --git a/src/shared/import-util.h b/src/shared/import-util.h index 8d017f61d1..c7ec3b4eab 100644 --- a/src/shared/import-util.h +++ b/src/shared/import-util.h @@ -10,7 +10,7 @@ typedef enum ImportVerify { IMPORT_VERIFY_CHECKSUM, IMPORT_VERIFY_SIGNATURE, _IMPORT_VERIFY_MAX, - _IMPORT_VERIFY_INVALID = -1, + _IMPORT_VERIFY_INVALID = -EINVAL, } ImportVerify; int import_url_last_component(const char *url, char **ret); diff --git a/src/shared/install.h b/src/shared/install.h index 84bf1f59d2..7d7a2c9f27 100644 --- a/src/shared/install.h +++ b/src/shared/install.h @@ -22,7 +22,7 @@ enum UnitFilePresetMode { UNIT_FILE_PRESET_ENABLE_ONLY, UNIT_FILE_PRESET_DISABLE_ONLY, _UNIT_FILE_PRESET_MAX, - _UNIT_FILE_PRESET_INVALID = -1 + _UNIT_FILE_PRESET_INVALID = -EINVAL, }; enum UnitFileChangeType { @@ -70,7 +70,7 @@ enum UnitFileType { UNIT_FILE_TYPE_SYMLINK, UNIT_FILE_TYPE_MASKED, _UNIT_FILE_TYPE_MAX, - _UNIT_FILE_TYPE_INVALID = -1, + _UNIT_FILE_TYPE_INVALID = -EINVAL, }; struct UnitFileInstallInfo { diff --git a/src/shared/ipvlan-util.h b/src/shared/ipvlan-util.h index 90f755b472..a475b37572 100644 --- a/src/shared/ipvlan-util.h +++ b/src/shared/ipvlan-util.h @@ -11,7 +11,7 @@ typedef enum IPVlanMode { NETDEV_IPVLAN_MODE_L3 = IPVLAN_MODE_L3, NETDEV_IPVLAN_MODE_L3S = IPVLAN_MODE_L3S, _NETDEV_IPVLAN_MODE_MAX, - _NETDEV_IPVLAN_MODE_INVALID = -1 + _NETDEV_IPVLAN_MODE_INVALID = -EINVAL, } IPVlanMode; typedef enum IPVlanFlags { @@ -19,7 +19,7 @@ typedef enum IPVlanFlags { NETDEV_IPVLAN_FLAGS_PRIVATE = IPVLAN_F_PRIVATE, NETDEV_IPVLAN_FLAGS_VEPA = IPVLAN_F_VEPA, _NETDEV_IPVLAN_FLAGS_MAX, - _NETDEV_IPVLAN_FLAGS_INVALID = -1 + _NETDEV_IPVLAN_FLAGS_INVALID = -EINVAL, } IPVlanFlags; const char *ipvlan_mode_to_string(IPVlanMode d) _const_; diff --git a/src/shared/json-internal.h b/src/shared/json-internal.h index 63afd22417..72a735171c 100644 --- a/src/shared/json-internal.h +++ b/src/shared/json-internal.h @@ -70,7 +70,7 @@ enum { /* JSON tokens */ JSON_TOKEN_BOOLEAN, JSON_TOKEN_NULL, _JSON_TOKEN_MAX, - _JSON_TOKEN_INVALID = -1, + _JSON_TOKEN_INVALID = -EINVAL, }; int json_tokenize(const char **p, char **ret_string, JsonValue *ret_value, unsigned *ret_line, unsigned *ret_column, void **state, unsigned *line, unsigned *column); diff --git a/src/shared/json.h b/src/shared/json.h index aad7326513..a335dd3623 100644 --- a/src/shared/json.h +++ b/src/shared/json.h @@ -53,7 +53,7 @@ typedef enum JsonVariantType { JSON_VARIANT_OBJECT, JSON_VARIANT_NULL, _JSON_VARIANT_TYPE_MAX, - _JSON_VARIANT_TYPE_INVALID = -1 + _JSON_VARIANT_TYPE_INVALID = -EINVAL, } JsonVariantType; int json_variant_new_stringn(JsonVariant **ret, const char *s, size_t n); diff --git a/src/shared/macvlan-util.h b/src/shared/macvlan-util.h index 0d3a5f4050..0705ecb6d8 100644 --- a/src/shared/macvlan-util.h +++ b/src/shared/macvlan-util.h @@ -10,7 +10,7 @@ typedef enum MacVlanMode { NETDEV_MACVLAN_MODE_PASSTHRU = MACVLAN_MODE_PASSTHRU, NETDEV_MACVLAN_MODE_SOURCE = MACVLAN_MODE_SOURCE, _NETDEV_MACVLAN_MODE_MAX, - _NETDEV_MACVLAN_MODE_INVALID = -1 + _NETDEV_MACVLAN_MODE_INVALID = -EINVAL, } MacVlanMode; const char *macvlan_mode_to_string(MacVlanMode d) _const_; diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h index 503a74ea33..28cd4e41f2 100644 --- a/src/shared/netif-naming-scheme.h +++ b/src/shared/netif-naming-scheme.h @@ -42,7 +42,7 @@ typedef enum NamingSchemeFlags { NAMING_V245 = NAMING_V243 | NAMING_NSPAWN_LONG_HASH, NAMING_V247 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT, - _NAMING_SCHEME_FLAGS_INVALID = -1, + _NAMING_SCHEME_FLAGS_INVALID = -EINVAL, } NamingSchemeFlags; typedef struct NamingScheme { diff --git a/src/shared/output-mode.h b/src/shared/output-mode.h index a879054b67..ba067c9f9c 100644 --- a/src/shared/output-mode.h +++ b/src/shared/output-mode.h @@ -21,7 +21,7 @@ typedef enum OutputMode { OUTPUT_CAT, OUTPUT_WITH_UNIT, _OUTPUT_MODE_MAX, - _OUTPUT_MODE_INVALID = -1 + _OUTPUT_MODE_INVALID = -EINVAL, } OutputMode; static inline bool OUTPUT_MODE_IS_JSON(OutputMode m) { diff --git a/src/shared/resolve-util.h b/src/shared/resolve-util.h index 4ea24a60b3..0f6e88e095 100644 --- a/src/shared/resolve-util.h +++ b/src/shared/resolve-util.h @@ -27,7 +27,7 @@ enum ResolveSupport { RESOLVE_SUPPORT_YES, RESOLVE_SUPPORT_RESOLVE, _RESOLVE_SUPPORT_MAX, - _RESOLVE_SUPPORT_INVALID = -1 + _RESOLVE_SUPPORT_INVALID = -EINVAL, }; enum DnssecMode { @@ -45,7 +45,7 @@ enum DnssecMode { DNSSEC_YES, _DNSSEC_MODE_MAX, - _DNSSEC_MODE_INVALID = -1 + _DNSSEC_MODE_INVALID = -EINVAL, }; enum DnsOverTlsMode { @@ -60,7 +60,7 @@ enum DnsOverTlsMode { DNS_OVER_TLS_YES, _DNS_OVER_TLS_MODE_MAX, - _DNS_OVER_TLS_MODE_INVALID = -1 + _DNS_OVER_TLS_MODE_INVALID = -EINVAL, }; CONFIG_PARSER_PROTOTYPE(config_parse_resolve_support); diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h index 4e6e903ddd..5fce03b25f 100644 --- a/src/shared/udev-util.h +++ b/src/shared/udev-util.h @@ -15,7 +15,7 @@ typedef enum ResolveNameTiming { RESOLVE_NAME_LATE, RESOLVE_NAME_EARLY, _RESOLVE_NAME_TIMING_MAX, - _RESOLVE_NAME_TIMING_INVALID = -1, + _RESOLVE_NAME_TIMING_INVALID = -EINVAL, } ResolveNameTiming; ResolveNameTiming resolve_name_timing_from_string(const char *s) _pure_; diff --git a/src/shared/user-record.h b/src/shared/user-record.h index 542a0dc84a..623f7bc9e4 100644 --- a/src/shared/user-record.h +++ b/src/shared/user-record.h @@ -54,7 +54,7 @@ typedef enum UserDisposition { USER_CONTAINER, /* UID ranges allocated for container uses */ USER_RESERVED, /* Range above 2^31 */ _USER_DISPOSITION_MAX, - _USER_DISPOSITION_INVALID = -1, + _USER_DISPOSITION_INVALID = -EINVAL, } UserDisposition; typedef enum UserHomeStorage { @@ -65,7 +65,7 @@ typedef enum UserHomeStorage { USER_FSCRYPT, USER_CIFS, _USER_STORAGE_MAX, - _USER_STORAGE_INVALID = -1 + _USER_STORAGE_INVALID = -EINVAL, } UserStorage; typedef enum UserRecordMask { diff --git a/src/shared/varlink.c b/src/shared/varlink.c index 24865fa07e..31128e02e0 100644 --- a/src/shared/varlink.c +++ b/src/shared/varlink.c @@ -54,7 +54,7 @@ typedef enum VarlinkState { VARLINK_DISCONNECTED, _VARLINK_STATE_MAX, - _VARLINK_STATE_INVALID = -1 + _VARLINK_STATE_INVALID = -EINVAL, } VarlinkState; /* Tests whether we are not yet disconnected. Note that this is true during all states where the connection diff --git a/src/shared/volatile-util.h b/src/shared/volatile-util.h index 9a1bb384e9..6e0206d3a0 100644 --- a/src/shared/volatile-util.h +++ b/src/shared/volatile-util.h @@ -7,7 +7,7 @@ typedef enum VolatileMode { VOLATILE_STATE, VOLATILE_OVERLAY, _VOLATILE_MODE_MAX, - _VOLATILE_MODE_INVALID = -1 + _VOLATILE_MODE_INVALID = -EINVAL, } VolatileMode; VolatileMode volatile_mode_from_string(const char *s); |