1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00

bootctl: split out "install" verb too

This commit is contained in:
Lennart Poettering 2022-12-19 11:42:15 +01:00
parent da36788f65
commit baafb202f8
5 changed files with 1184 additions and 1188 deletions

View File

@ -2607,6 +2607,8 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
'bootctl',
['src/boot/bootctl.c',
'src/boot/bootctl.h',
'src/boot/bootctl-install.c',
'src/boot/bootctl-install.h',
'src/boot/bootctl-random-seed.c',
'src/boot/bootctl-random-seed.h',
'src/boot/bootctl-reboot-to-firmware.c',

1157
src/boot/bootctl-install.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
int verb_install(int argc, char *argv[], void *userdata);
int verb_remove(int argc, char *argv[], void *userdata);
int verb_is_installed(int argc, char *argv[], void *userdata);

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,20 @@
#include "json.h"
#include "pager.h"
typedef enum EntryTokenType {
ARG_ENTRY_TOKEN_MACHINE_ID,
ARG_ENTRY_TOKEN_OS_IMAGE_ID,
ARG_ENTRY_TOKEN_OS_ID,
ARG_ENTRY_TOKEN_LITERAL,
ARG_ENTRY_TOKEN_AUTO,
} EntryTokenType;
typedef enum InstallSource {
ARG_INSTALL_SOURCE_IMAGE,
ARG_INSTALL_SOURCE_HOST,
ARG_INSTALL_SOURCE_AUTO,
} InstallSource;
extern char *arg_esp_path;
extern char *arg_xbootldr_path;
extern bool arg_print_esp_path;
@ -17,11 +31,13 @@ extern bool arg_quiet;
extern int arg_make_entry_directory; /* tri-state: < 0 for automatic logic */
extern sd_id128_t arg_machine_id;
extern char *arg_install_layout;
extern EntryTokenType arg_entry_token_type;
extern char *arg_entry_token;
extern JsonFormatFlags arg_json_format_flags;
extern bool arg_arch_all;
extern char *arg_root;
extern char *arg_image;
extern InstallSource arg_install_source;
extern char *arg_efi_boot_option_description;
static inline const char *arg_dollar_boot_path(void) {