From a4b3f800a335d9185ff397c420eb6ef4e0ea48c1 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Mon, 29 Jul 2024 01:48:50 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20disk:=20refactor=20root=20part?= =?UTF-8?q?=20dump=20using=20helper=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/disk.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/disk.cpp b/src/disk.cpp index 733dd50..68ba486 100644 --- a/src/disk.cpp +++ b/src/disk.cpp @@ -102,6 +102,10 @@ void btrfs_create_subvols(std::vector& partitions, const st if (!gucc::fs::btrfs_append_subvolumes(partitions, subvolumes)) { spdlog::error("Failed to append btrfs subvolumes into partition scheme"); } + + // need to find it again, due to modifying the parts + root_part = find_root_btrfs_part(partitions); + utils::dump_partition_to_log(*root_part); return; } if (!ignore_note) { @@ -126,9 +130,7 @@ void btrfs_create_subvols(std::vector& partitions, const st // need to find it again, due to modifying the parts root_part = find_root_btrfs_part(partitions); - - spdlog::debug("root partition: fs='{}';mountpoint='{}';uuid_str='{}';device='{}';mount_opts='{}';subvolume='{}'", - root_part->fstype, root_part->mountpoint, root_part->uuid_str, root_part->device, root_part->mount_opts, *root_part->subvolume); + utils::dump_partition_to_log(*root_part); } void mount_existing_subvols(std::vector& partitions) noexcept { @@ -185,9 +187,7 @@ void mount_existing_subvols(std::vector& partitions) noexce // need to find it again, due to modifying the parts root_part = find_root_btrfs_part(partitions); - - spdlog::debug("root partition: fs='{}';mountpoint='{}';uuid_str='{}';device='{}';mount_opts='{}';subvolume='{}'", - root_part->fstype, root_part->mountpoint, root_part->uuid_str, root_part->device, root_part->mount_opts, *root_part->subvolume); + utils::dump_partition_to_log(*root_part); #endif }