1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-31 05:47:30 +03:00
systemd/src/shared/geneve-util.h
Zbigniew Jędrzejewski-Szmek 2d93c20e5f 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.
2021-02-10 14:46:59 +01:00

18 lines
496 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <linux/if_link.h>
#include "conf-parser.h"
typedef enum GeneveDF {
NETDEV_GENEVE_DF_UNSET = GENEVE_DF_UNSET,
NETDEV_GENEVE_DF_SET = GENEVE_DF_SET,
NETDEV_GENEVE_DF_INHERIT = GENEVE_DF_INHERIT,
_NETDEV_GENEVE_DF_MAX,
_NETDEV_GENEVE_DF_INVALID = -EINVAL,
} GeneveDF;
const char *geneve_df_to_string(GeneveDF d) _const_;
GeneveDF geneve_df_from_string(const char *d) _pure_;