From: Arvin Schnell Date: Wed, 23 Jul 2025 09:09:52 +0000 (+0200) Subject: - store config_name and root_prefix in snapper object X-Git-Tag: v0.13.0~36^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1033%2Fhead;p=thirdparty%2Fsnapper.git - store config_name and root_prefix in snapper object --- diff --git a/snapper/Snapper.cc b/snapper/Snapper.cc index a1f0f91d..7c54cc33 100644 --- a/snapper/Snapper.cc +++ b/snapper/Snapper.cc @@ -1,6 +1,6 @@ /* * Copyright (c) [2011-2015] Novell, Inc. - * Copyright (c) [2016-2024] SUSE LLC + * Copyright (c) [2016-2025] SUSE LLC * * All Rights Reserved. * @@ -92,13 +92,12 @@ namespace snapper Snapper::Snapper(const string& config_name, const string& root_prefix, bool disable_filters) - : snapshots(this) + : config_name(config_name), root_prefix(root_prefix), snapshots(this) { - y2mil("Snapper constructor"); + y2mil("Snapper constructor '" << config_name << "'"); y2mil("snapper version " VERSION); y2mil("libsnapper version " LIBSNAPPER_VERSION_STRING); - y2mil("config_name:" << config_name << " root_prefix:" << root_prefix << - " disable_filters:" << disable_filters); + y2mil("root-prefix:" << root_prefix << " disable-filters:" << disable_filters); try { @@ -139,7 +138,7 @@ namespace snapper Snapper::~Snapper() { - y2mil("Snapper destructor"); + y2mil("Snapper destructor '" << config_name << "'"); for (Snapshots::iterator it = snapshots.begin(); it != snapshots.end(); ++it) { diff --git a/snapper/Snapper.h b/snapper/Snapper.h index 7d8dbda2..0f09673c 100644 --- a/snapper/Snapper.h +++ b/snapper/Snapper.h @@ -1,6 +1,6 @@ /* * Copyright (c) [2011-2015] Novell, Inc. - * Copyright (c) [2016-2023] SUSE LLC + * Copyright (c) [2016-2025] SUSE LLC * * All Rights Reserved. * @@ -229,7 +229,8 @@ namespace snapper void syncInfoDir(SDir& dir) const; - // const std::string root_prefix; // TODO ABI change + const std::string config_name; + const std::string root_prefix; ConfigInfo* config_info = nullptr;