HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/shared/firstboot-util.h

Git blob: 68c8bceace45eab221e10cffc325f13365b91905

Lines 1–19 of 19

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
 
#include "forward.h"
 
/* Parsed value of the systemd.firstboot= kernel command line option, honoured by systemd-firstboot,
 * homectl's firstboot logic and systemd-cryptenroll. */
typedef enum FirstBootMode {
        FIRSTBOOT_NO,           /* "no": don't prompt, don't auto-configure */
        FIRSTBOOT_INTERACTIVE,  /* "interactive" or unset: prompt as needed */
        FIRSTBOOT_HEADLESS,     /* "headless": auto-configure, but never prompt */
        _FIRSTBOOT_MODE_MAX,
        _FIRSTBOOT_MODE_INVALID = -EINVAL,
} FirstBootMode;
 
DECLARE_STRING_TABLE_LOOKUP(firstboot_mode, FirstBootMode);
 
int firstboot_mode_from_cmdline(FirstBootMode *ret, char **reterr_value);