summaryrefslogtreecommitdiff
path: root/src/boot/bootctl.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-02-20 17:25:14 +0100
committerLennart Poettering <lennart@poettering.net>2023-02-21 18:19:38 +0100
commitc56be2c294f55545ea34417a2ec4f6ad2cd1df6f (patch)
tree93cee6bbda623c51da5ff8d4c9ea16cf776c6a90 /src/boot/bootctl.h
parentb469b969f30dbb4d4aeeccab79ec8f3782e769aa (diff)
downloadsystemd-c56be2c294f55545ea34417a2ec4f6ad2cd1df6f.tar.gz
bootctl: add new --print-root-device option
We already have this nice code in system that determines the block device backing the root file system, but it's only used internally in systemd-gpt-generator. Let's make this more accessible and expose it directly in bootctl. It doesn't fit immediately into the topic of bootctl, but I think it's close enough and behaves very similar to the existing "bootctl --print-boot-path" and "--print-esp-path" tools. If --print-root-device (or -R) is specified once, will show the block device backing the root fs, and if specified twice (probably easier: -RR) it will show the whole block device that block device belongs to in case it is a partition block device. Suggested use: # cfdisk `bootctl -RR` To get access to the partition table, behind the OS install, for whatever it might be.
Diffstat (limited to 'src/boot/bootctl.h')
-rw-r--r--src/boot/bootctl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/boot/bootctl.h b/src/boot/bootctl.h
index 311b954c2c..9012bf932b 100644
--- a/src/boot/bootctl.h
+++ b/src/boot/bootctl.h
@@ -24,6 +24,7 @@ extern char *arg_esp_path;
extern char *arg_xbootldr_path;
extern bool arg_print_esp_path;
extern bool arg_print_dollar_boot_path;
+extern unsigned arg_print_root_device;
extern bool arg_touch_variables;
extern PagerFlags arg_pager_flags;
extern bool arg_graceful;