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.
This commit is contained in:
Lennart Poettering
2018-05-22 13:14:18 +02:00
parent abdf29f50d
commit 081a0c7256
2 changed files with 10 additions and 18 deletions
+1
View File
@@ -16,5 +16,6 @@ typedef enum VolatileMode {
} VolatileMode;
VolatileMode volatile_mode_from_string(const char *s);
const char* volatile_mode_to_string(VolatileMode m);
int query_volatile_mode(VolatileMode *ret);