Systemd/src/shared/volatile-util.h
Lennart Poettering 081a0c7256 volatile-mode: use the usual string table macros for implementing volatile_mode_from_string()
Let's shorten our code a bit, and also add the matching _to_string()
call.
2018-05-22 13:14:18 +02:00

22 lines
464 B
C

/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
/***
This file is part of systemd.
Copyright 2016 Lennart Poettering
***/
typedef enum VolatileMode {
VOLATILE_NO,
VOLATILE_YES,
VOLATILE_STATE,
_VOLATILE_MODE_MAX,
_VOLATILE_MODE_INVALID = -1
} VolatileMode;
VolatileMode volatile_mode_from_string(const char *s);
const char* volatile_mode_to_string(VolatileMode m);
int query_volatile_mode(VolatileMode *ret);