| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
|
| 6 |
typedef enum FactoryResetMode { |
| 7 |
FACTORY_RESET_UNSUPPORTED, /* feature not available on this OS */ |
| 8 |
FACTORY_RESET_UNSPECIFIED, /* not specified on the kernel cmdline, nor via EFI variable */ |
| 9 |
FACTORY_RESET_OFF, /* explicitly turned off on kernel cmdline */ |
| 10 |
FACTORY_RESET_ON, /* turned on via kernel cmdline or EFI variable */ |
| 11 |
FACTORY_RESET_COMPLETE, /* turned on via kernel cmdline or EFI variable, but marked as complete now */ |
| 12 |
FACTORY_RESET_PENDING, /* marked for next boot via EFI variable, but not in effect on this boot */ |
| 13 |
_FACTORY_RESET_MODE_MAX, |
| 14 |
_FACTORY_RESET_MODE_INVALID = -EINVAL, |
| 15 |
_FACTORY_RESET_MODE_ERRNO_MAX = -ERRNO_MAX, |
| 16 |
} FactoryResetMode; |
| 17 |
|
| 18 |
FactoryResetMode factory_reset_mode(void); |
| 19 |
|
| 20 |
DECLARE_STRING_TABLE_LOOKUP(factory_reset_mode, FactoryResetMode); |