• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright (c) 2018 Jan Stancek <jstancek@redhat.com>
3  */
4 
5 #ifndef TST_SYS_CONF_H__
6 #define TST_SYS_CONF_H__
7 
8 #define TST_SR_TCONF_MISSING 0x0
9 #define TST_SR_TBROK_MISSING 0x1
10 #define TST_SR_SKIP_MISSING 0x2
11 #define TST_SR_TCONF_RO 0x0
12 #define TST_SR_TBROK_RO 0x4
13 #define TST_SR_SKIP_RO 0x8
14 #define TST_SR_IGNORE_ERR 0x10
15 
16 #define TST_SR_TCONF (TST_SR_TCONF_MISSING | TST_SR_TCONF_RO)
17 #define TST_SR_TBROK (TST_SR_TBROK_MISSING | TST_SR_TBROK_RO)
18 #define TST_SR_SKIP (TST_SR_SKIP_MISSING | TST_SR_SKIP_RO)
19 
20 struct tst_path_val {
21         const char *path;
22         const char *val;
23 	unsigned int flags;
24 };
25 
26 void tst_sys_conf_save_str(const char *path, const char *value);
27 int tst_sys_conf_save(const struct tst_path_val *conf);
28 void tst_sys_conf_restore(int verbose);
29 void tst_sys_conf_dump(void);
30 
31 #endif
32